Repository: radlab/sparrow Branch: master Commit: afb8efadeb88 Files: 407 Total size: 12.9 MB Directory structure: gitextract_h85zoo_k/ ├── .gitignore ├── LICENSE ├── deploy/ │ ├── README │ ├── ec2/ │ │ ├── README │ │ ├── ec2-exp.sh │ │ ├── ec2_exp.py │ │ ├── fairness.py │ │ ├── fairness.sh │ │ ├── isolation.py │ │ ├── isolation.sh │ │ ├── osdi.py │ │ ├── prepare_tpch_experiments.py │ │ ├── prepare_tpch_experiments.sh │ │ ├── probe-ratio-het.sh │ │ ├── probe-ratio.sh │ │ ├── probe_ratio.py │ │ ├── probe_ratio_het.py │ │ ├── spark_v_mesos.py │ │ ├── template/ │ │ │ ├── README │ │ │ ├── backends.txt │ │ │ ├── build_sparrow.sh │ │ │ ├── clean_logs.sh │ │ │ ├── configure_node.sh │ │ │ ├── create_database.sh │ │ │ ├── create_tpch_tables_primary.sh │ │ │ ├── create_tpch_tables_secondary.sh │ │ │ ├── deploy_sparrow.sh │ │ │ ├── find_bugs.sh │ │ │ ├── find_bugs_filtered.sh │ │ │ ├── find_bugs_verbose.sh │ │ │ ├── find_cache_partitions.sh │ │ │ ├── frontend.conf │ │ │ ├── frontends.txt │ │ │ ├── hadoop-env.sh │ │ │ ├── hdfs-site.xml │ │ │ ├── hive-site.xml │ │ │ ├── prepare_logs.sh │ │ │ ├── shark-env.sh │ │ │ ├── spark-env.sh │ │ │ ├── spark-run.sh │ │ │ ├── sparrow.conf │ │ │ ├── sparrow_schedulers.txt │ │ │ ├── start_mesos_master.sh │ │ │ ├── start_mesos_slave.sh │ │ │ ├── start_proto_backend.sh │ │ │ ├── start_proto_frontend.sh │ │ │ ├── start_shark_tpch.sh │ │ │ ├── start_spark_backend.sh │ │ │ ├── start_spark_frontend.sh │ │ │ ├── start_sparrow.sh │ │ │ ├── start_throughput_exp_spark.sh │ │ │ ├── start_throughput_exp_sparrow.sh │ │ │ ├── stop_mesos_master.sh │ │ │ ├── stop_mesos_slave.sh │ │ │ ├── stop_proto_backend.sh │ │ │ ├── stop_proto_frontend.sh │ │ │ ├── stop_spark_backend.sh │ │ │ ├── stop_spark_frontend.sh │ │ │ ├── stop_sparrow.sh │ │ │ ├── tpch/ │ │ │ │ ├── make_base_tables.hql │ │ │ │ ├── make_denorm_cached.hql │ │ │ │ ├── make_denorm_table_primary.hql │ │ │ │ ├── make_denorm_table_secondary.hql │ │ │ │ ├── tpch_workload_1 │ │ │ │ ├── tpch_workload_10 │ │ │ │ ├── tpch_workload_11 │ │ │ │ ├── tpch_workload_12 │ │ │ │ ├── tpch_workload_13 │ │ │ │ ├── tpch_workload_14 │ │ │ │ ├── tpch_workload_15 │ │ │ │ ├── tpch_workload_2 │ │ │ │ ├── tpch_workload_3 │ │ │ │ ├── tpch_workload_4 │ │ │ │ ├── tpch_workload_5 │ │ │ │ ├── tpch_workload_6 │ │ │ │ ├── tpch_workload_7 │ │ │ │ ├── tpch_workload_8 │ │ │ │ └── tpch_workload_9 │ │ │ ├── tpch_experiment.sh │ │ │ └── wipe_hdfs.sh │ │ └── tpch_experiments.py │ ├── example_sparrow_configuration.conf │ └── third_party/ │ └── boto-2.1.1/ │ ├── PKG-INFO │ ├── bin/ │ │ ├── bundle_image │ │ ├── cfadmin │ │ ├── cq │ │ ├── cwutil │ │ ├── elbadmin │ │ ├── fetch_file │ │ ├── kill_instance │ │ ├── launch_instance │ │ ├── list_instances │ │ ├── lss3 │ │ ├── pyami_sendmail │ │ ├── route53 │ │ ├── s3multiput │ │ ├── s3put │ │ ├── sdbadmin │ │ └── taskadmin │ ├── boto/ │ │ ├── __init__.py │ │ ├── auth.py │ │ ├── auth_handler.py │ │ ├── cacerts/ │ │ │ ├── __init__.py │ │ │ └── cacerts.txt │ │ ├── cloudformation/ │ │ │ ├── __init__.py │ │ │ ├── connection.py │ │ │ ├── stack.py │ │ │ └── template.py │ │ ├── cloudfront/ │ │ │ ├── __init__.py │ │ │ ├── distribution.py │ │ │ ├── exception.py │ │ │ ├── identity.py │ │ │ ├── invalidation.py │ │ │ ├── logging.py │ │ │ ├── object.py │ │ │ ├── origin.py │ │ │ └── signers.py │ │ ├── connection.py │ │ ├── contrib/ │ │ │ ├── __init__.py │ │ │ ├── m2helpers.py │ │ │ └── ymlmessage.py │ │ ├── ec2/ │ │ │ ├── __init__.py │ │ │ ├── address.py │ │ │ ├── autoscale/ │ │ │ │ ├── __init__.py │ │ │ │ ├── activity.py │ │ │ │ ├── group.py │ │ │ │ ├── instance.py │ │ │ │ ├── launchconfig.py │ │ │ │ ├── policy.py │ │ │ │ ├── request.py │ │ │ │ └── scheduled.py │ │ │ ├── blockdevicemapping.py │ │ │ ├── bundleinstance.py │ │ │ ├── buyreservation.py │ │ │ ├── cloudwatch/ │ │ │ │ ├── __init__.py │ │ │ │ ├── alarm.py │ │ │ │ ├── datapoint.py │ │ │ │ ├── listelement.py │ │ │ │ └── metric.py │ │ │ ├── connection.py │ │ │ ├── ec2object.py │ │ │ ├── elb/ │ │ │ │ ├── __init__.py │ │ │ │ ├── healthcheck.py │ │ │ │ ├── instancestate.py │ │ │ │ ├── listelement.py │ │ │ │ ├── listener.py │ │ │ │ ├── loadbalancer.py │ │ │ │ ├── policies.py │ │ │ │ └── securitygroup.py │ │ │ ├── image.py │ │ │ ├── instance.py │ │ │ ├── instanceinfo.py │ │ │ ├── keypair.py │ │ │ ├── launchspecification.py │ │ │ ├── placementgroup.py │ │ │ ├── regioninfo.py │ │ │ ├── reservedinstance.py │ │ │ ├── securitygroup.py │ │ │ ├── snapshot.py │ │ │ ├── spotdatafeedsubscription.py │ │ │ ├── spotinstancerequest.py │ │ │ ├── spotpricehistory.py │ │ │ ├── tag.py │ │ │ ├── volume.py │ │ │ └── zone.py │ │ ├── ecs/ │ │ │ ├── __init__.py │ │ │ └── item.py │ │ ├── emr/ │ │ │ ├── __init__.py │ │ │ ├── bootstrap_action.py │ │ │ ├── connection.py │ │ │ ├── emrobject.py │ │ │ ├── instance_group.py │ │ │ └── step.py │ │ ├── exception.py │ │ ├── file/ │ │ │ ├── __init__.py │ │ │ ├── bucket.py │ │ │ ├── connection.py │ │ │ ├── key.py │ │ │ └── simpleresultset.py │ │ ├── fps/ │ │ │ ├── __init__.py │ │ │ └── connection.py │ │ ├── gs/ │ │ │ ├── __init__.py │ │ │ ├── acl.py │ │ │ ├── bucket.py │ │ │ ├── connection.py │ │ │ ├── key.py │ │ │ ├── resumable_upload_handler.py │ │ │ └── user.py │ │ ├── handler.py │ │ ├── https_connection.py │ │ ├── iam/ │ │ │ ├── __init__.py │ │ │ ├── connection.py │ │ │ └── summarymap.py │ │ ├── jsonresponse.py │ │ ├── manage/ │ │ │ ├── __init__.py │ │ │ ├── cmdshell.py │ │ │ ├── propget.py │ │ │ ├── server.py │ │ │ ├── task.py │ │ │ ├── test_manage.py │ │ │ └── volume.py │ │ ├── mashups/ │ │ │ ├── __init__.py │ │ │ ├── interactive.py │ │ │ ├── iobject.py │ │ │ ├── order.py │ │ │ └── server.py │ │ ├── mturk/ │ │ │ ├── __init__.py │ │ │ ├── connection.py │ │ │ ├── notification.py │ │ │ ├── price.py │ │ │ ├── qualification.py │ │ │ └── question.py │ │ ├── plugin.py │ │ ├── provider.py │ │ ├── pyami/ │ │ │ ├── __init__.py │ │ │ ├── bootstrap.py │ │ │ ├── config.py │ │ │ ├── copybot.py │ │ │ ├── helloworld.py │ │ │ ├── launch_ami.py │ │ │ ├── scriptbase.py │ │ │ └── startup.py │ │ ├── rds/ │ │ │ ├── __init__.py │ │ │ ├── dbinstance.py │ │ │ ├── dbsecuritygroup.py │ │ │ ├── dbsnapshot.py │ │ │ ├── event.py │ │ │ ├── parametergroup.py │ │ │ └── regioninfo.py │ │ ├── regioninfo.py │ │ ├── resultset.py │ │ ├── roboto/ │ │ │ ├── __init__.py │ │ │ ├── awsqueryrequest.py │ │ │ ├── awsqueryservice.py │ │ │ └── param.py │ │ ├── route53/ │ │ │ ├── __init__.py │ │ │ ├── connection.py │ │ │ ├── exception.py │ │ │ ├── hostedzone.py │ │ │ └── record.py │ │ ├── s3/ │ │ │ ├── __init__.py │ │ │ ├── acl.py │ │ │ ├── bucket.py │ │ │ ├── bucketlistresultset.py │ │ │ ├── connection.py │ │ │ ├── deletemarker.py │ │ │ ├── key.py │ │ │ ├── multipart.py │ │ │ ├── prefix.py │ │ │ ├── resumable_download_handler.py │ │ │ └── user.py │ │ ├── sdb/ │ │ │ ├── __init__.py │ │ │ ├── connection.py │ │ │ ├── db/ │ │ │ │ ├── __init__.py │ │ │ │ ├── blob.py │ │ │ │ ├── key.py │ │ │ │ ├── manager/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── pgmanager.py │ │ │ │ │ ├── sdbmanager.py │ │ │ │ │ └── xmlmanager.py │ │ │ │ ├── model.py │ │ │ │ ├── property.py │ │ │ │ ├── query.py │ │ │ │ ├── sequence.py │ │ │ │ └── test_db.py │ │ │ ├── domain.py │ │ │ ├── item.py │ │ │ ├── queryresultset.py │ │ │ └── regioninfo.py │ │ ├── services/ │ │ │ ├── __init__.py │ │ │ ├── bs.py │ │ │ ├── message.py │ │ │ ├── result.py │ │ │ ├── service.py │ │ │ ├── servicedef.py │ │ │ ├── sonofmmm.py │ │ │ └── submit.py │ │ ├── ses/ │ │ │ ├── __init__.py │ │ │ └── connection.py │ │ ├── sns/ │ │ │ ├── __init__.py │ │ │ └── connection.py │ │ ├── sqs/ │ │ │ ├── __init__.py │ │ │ ├── attributes.py │ │ │ ├── connection.py │ │ │ ├── jsonmessage.py │ │ │ ├── message.py │ │ │ ├── queue.py │ │ │ └── regioninfo.py │ │ ├── storage_uri.py │ │ ├── sts/ │ │ │ ├── __init__.py │ │ │ ├── connection.py │ │ │ └── credentials.py │ │ ├── utils.py │ │ └── vpc/ │ │ ├── __init__.py │ │ ├── customergateway.py │ │ ├── dhcpoptions.py │ │ ├── internetgateway.py │ │ ├── routetable.py │ │ ├── subnet.py │ │ ├── vpc.py │ │ ├── vpnconnection.py │ │ └── vpngateway.py │ └── setup.py ├── lib/ │ ├── README │ └── javax.jms-1.1.jar ├── pom.xml ├── readme.markdown ├── simulation/ │ ├── run_simulation.py │ ├── simulation.py │ ├── simulation_batch.py │ ├── simulation_cancellation.py │ ├── simulation_centralized.py │ ├── simulation_hacked.py │ ├── simulation_multi.py │ ├── simulation_random.py │ ├── test_simulation_cancellation.py │ ├── test_simulation_multi.py │ └── util.py ├── src/ │ ├── main/ │ │ ├── gen-java/ │ │ │ └── edu/ │ │ │ └── berkeley/ │ │ │ └── sparrow/ │ │ │ └── thrift/ │ │ │ ├── BackendService.java │ │ │ ├── FrontendService.java │ │ │ ├── GetTaskService.java │ │ │ ├── IncompleteRequestException.java │ │ │ ├── InternalService.java │ │ │ ├── LoadSpec.java │ │ │ ├── NodeMonitorService.java │ │ │ ├── PongService.java │ │ │ ├── SchedulerService.java │ │ │ ├── SchedulerStateStoreService.java │ │ │ ├── StateStoreService.java │ │ │ ├── TCancelTaskReservationsRequest.java │ │ │ ├── TEnqueueTaskReservationsRequest.java │ │ │ ├── TFullTaskId.java │ │ │ ├── THostPort.java │ │ │ ├── TNodeState.java │ │ │ ├── TPlacementPreference.java │ │ │ ├── TResourceVector.java │ │ │ ├── TSchedulingRequest.java │ │ │ ├── TTaskLaunchSpec.java │ │ │ ├── TTaskSpec.java │ │ │ └── TUserGroupInfo.java │ │ ├── java/ │ │ │ └── edu/ │ │ │ └── berkeley/ │ │ │ └── sparrow/ │ │ │ ├── api/ │ │ │ │ ├── SparrowBackendClient.java │ │ │ │ └── SparrowFrontendClient.java │ │ │ ├── daemon/ │ │ │ │ ├── SparrowConf.java │ │ │ │ ├── SparrowDaemon.java │ │ │ │ ├── StandaloneStateStore.java │ │ │ │ ├── nodemonitor/ │ │ │ │ │ ├── ConfigNodeMonitorState.java │ │ │ │ │ ├── FifoTaskScheduler.java │ │ │ │ │ ├── NoQueueTaskScheduler.java │ │ │ │ │ ├── NodeMonitor.java │ │ │ │ │ ├── NodeMonitorState.java │ │ │ │ │ ├── NodeMonitorThrift.java │ │ │ │ │ ├── PriorityTaskScheduler.java │ │ │ │ │ ├── RoundRobinTaskScheduler.java │ │ │ │ │ ├── StandaloneNodeMonitorState.java │ │ │ │ │ ├── TaskLauncherService.java │ │ │ │ │ └── TaskScheduler.java │ │ │ │ ├── scheduler/ │ │ │ │ │ ├── CancellationService.java │ │ │ │ │ ├── ConfigSchedulerState.java │ │ │ │ │ ├── ConstrainedTaskPlacer.java │ │ │ │ │ ├── Scheduler.java │ │ │ │ │ ├── SchedulerState.java │ │ │ │ │ ├── SchedulerThrift.java │ │ │ │ │ ├── StandaloneSchedulerState.java │ │ │ │ │ ├── TaskPlacer.java │ │ │ │ │ └── UnconstrainedTaskPlacer.java │ │ │ │ └── util/ │ │ │ │ ├── ConfigUtil.java │ │ │ │ ├── Logging.java │ │ │ │ ├── Network.java │ │ │ │ ├── Resolution.java │ │ │ │ ├── Resources.java │ │ │ │ ├── Serialization.java │ │ │ │ ├── TClients.java │ │ │ │ ├── TServers.java │ │ │ │ └── ThriftClientPool.java │ │ │ └── examples/ │ │ │ ├── BackendBenchmarkProfiler.java │ │ │ ├── FairnessTestingFrontend.java │ │ │ ├── HeterogeneousFrontend.java │ │ │ ├── PingClient.java │ │ │ ├── PongServer.java │ │ │ ├── ProtoBackend.java │ │ │ ├── ProtoFrontend.java │ │ │ ├── ProtoFrontendAsync.java │ │ │ ├── SimpleBackend.java │ │ │ ├── SimpleFrontend.java │ │ │ ├── ThriftPongClient.java │ │ │ ├── ThriftPongServer.java │ │ │ ├── ThroughputTestingFrontend.java │ │ │ └── readme.markdown │ │ ├── python/ │ │ │ ├── README │ │ │ ├── get_response_time.py │ │ │ ├── get_utilization.py │ │ │ ├── parse_logs.py │ │ │ ├── parse_logs.sh │ │ │ ├── parse_per_task_logs.py │ │ │ ├── parse_per_task_logs.sh │ │ │ ├── parse_tpch_logs.py │ │ │ ├── parse_tpch_logs.sh │ │ │ ├── service_per_node.py │ │ │ └── third_party/ │ │ │ └── stats.py │ │ └── thrift/ │ │ ├── build.sh │ │ ├── service.thrift │ │ └── types.thrift │ └── test/ │ └── java/ │ └── edu/ │ └── berkeley/ │ └── sparrow/ │ └── daemon/ │ ├── nodemonitor/ │ │ └── TestTaskScheduler.java │ ├── scheduler/ │ │ ├── TestConstrainedTaskPlacer.java │ │ └── TestUnconstrainedTaskPlacer.java │ └── util/ │ └── TestThriftClientPool.java └── upload.py ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ *.class .classpath .project target/ *.swp *.pyc ================================================ FILE: LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: deploy/README ================================================ Files related to deploying Sparrow. The ec2 directory contains files for deploying Sparrow on ec2. The Sparrow AMI is not yet public, so it is not currently possible for external users to use these scripts. Contact us is this is a problem for you. If you'd like to deploy Sparrow on your own cluster, you'll need to do a few things: 1) Download Sparrow: $ git clone git://github.com/radlab/sparrow.git 2) Build Sparrow: $ cd sparrow $ mvn package 3) Write a configuration file and copy the file to all machines. Currently, each Sparrow scheduler needs a configuration file that gives a list of where all of the Sparrow node monitors (worker machines) are running. See sparrow_configuration_example.conf to get started; see daemon/SparrowConf.java for a full list of options. 4) Start Sparrow on all machines (both schedulers and node monitors). Starting Sparrow runs both a scheduler and a node monitor on the machine. Using the concurrent mark and sweep garbage collector is highly recommended -- the GC pauses using other gargabge collectors become significant when running sub-second tasks). Change the class path to reflect the location where you built Sparrow, and replace "sparrow.conf" with the location of the congiguration file you wrote above. $ java -XX:+UseConcMarkSweepGC -cp target/sparrow-1.0-SNAPSHOT.jar edu.berkeley.sparrow.daemon.SparrowDaemon -c sparrow.conf 5) Start your application executor on all backends. To use the prototype backend, which can run either CPU-intensive or memory-intensive tasks for some period of time: $ java -cp target/sparrow-1.0-SNAPSHOT.jar edu.berkeley.sparrow.prototype.ProtoBackend 6) Start a frontend that submits scheduling requests to Sparrow. The current implementation assumes that there is a scheduler running on the same machine where the frontend is started, so frontends should only be started on machines where Sparrow is running. $ java -cp target/sparrow-1.0-SNAPSHOT.jar edu.berkeley.sparrow.prototype.ProtoFrontend The frontend accepts a configuration file (by adding "-c conf_file" when starting the frontend) where you can specify various configuration options to submit different types of jobs (e.g., with different numbers of tasks, of different duration, etc.), described in prototype/ProtoFrontend.java. ================================================ FILE: deploy/ec2/README ================================================ This script automates the deployment of a Sparrow cluster on ec2. To use it: 1) Get an ec2 account. 2) Get your access key ID and value from ec2. You need to have these available in environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY respectively. 3) Generate a key-pair in the AWS control panel in the "US East" datacenter. 4) Run ./ec2_exp.sh --help to see how the script works. The basic workflow would is usually like this. # Launch instances ./ec2-exp.sh launch -k eastkey -i ~/.ssh/eastkey.pem # Deploy Sparrow files, waiting 100 seconds for instances to boot before # attempting to contact them. It will also set the job rate to 10 jobs/s # on each frontend (-l 10). This will generate config files and send # them to all machines. ./ec2-exp.sh deploy -i ~/.ssh/eastkey.pem -w 100 -l 10 # Start Sparrow ./ec2-exp.sh start -i ~/.ssh/eastkey.pem # Start proto application ./ec2-exp.sh start-proto -i ~/.ssh/eastkey.pem # Stop proto application ./ec2-exp.sh stop-proto -i ~/.ssh/eastkey.pem # Stop Sparrow ./ec2-exp.sh stop -i ~/.ssh/eastkey.pem NOTE: Right now if you start and stop the proto application while keeping Sparrow running (i.e. you don't also restart Sparrow) things break. You will get a confusing Thrift error if you do this. If you'd like to run the full TPC-H experiment, you need to run two scripts: 1) prepare_tpch_experiments.sh : This script launches the given number of frontend and backend machines, and loads the TPCH data into HDFS and then into Shark. 2) tpch_experiments.sh: This runs the TPCH experiments and can be executed multiple times after the prepare_tpch_experiments.sh script has been run. ================================================ FILE: deploy/ec2/ec2-exp.sh ================================================ #!/bin/sh # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # cd "`dirname $0`" PYTHONPATH="$PYTHONPATH:../third_party/boto-2.1.1" python ./ec2_exp.py $@ ================================================ FILE: deploy/ec2/ec2_exp.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import boto import os import sys import tempfile import time import subprocess import shutil import random from optparse import OptionParser def parse_args(force_action=True): parser = OptionParser(usage="sparrow-exp [options]" + "\n\n 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") parser.add_option("-z", "--zone", default="us-east-1d", help="Availability zone to launch instances in") parser.add_option("-a", "--ami", default="ami-533a733a", help="Amazon Machine Image ID to use (use ami-894801e0 for HVM instance types)") parser.add_option("-t", "--instance-type", default="m2.2xlarge", help="Type of instance to launch (default: m2.2xlarge). " + "WARNING: must be 64 bit, thus small instances won't work") parser.add_option("-l", "--arrival-rate", type="float", default=1, help = "Arrival rate of jobs in proto frontends (jobs/s)") parser.add_option("-k", "--key-pair", help="Key pair to use on instances") parser.add_option("-i", "--identity-file", help="SSH private key file to use for logging into instances") parser.add_option("-f", "--frontends", type="int", default=1, help="Number of frontends to launch (default: 1)") parser.add_option("-b", "--backends", type="int", default=1, help="Number of backends to launch (default: 1)") parser.add_option("-w", "--wait", type="int", default=0, help="Number of seconds to wait for cluster nodes to boot (default: 0)") parser.add_option("-g", "--branch", default="master", help="Which git branch to checkout") parser.add_option("-s", "--spark-branch", default="sparrow", help="Which git branch to checkout (for spark)") parser.add_option("-d", "--log-dir", default="/tmp/", help="Local directory into which log files are copied") parser.add_option("-n", "--tasks-per-job", type="int", default=1, help="Number of tasks to launch for each job in prototype") parser.add_option("-x", "--num-preferred-nodes", type="int", default=0, help="Number of preferred nodes to use in the prototype frontend (0 means unconstrained)") parser.add_option("-c", "--benchmark-id", type="int", default=1, help="Which benchmark to run") parser.add_option("-e", "--benchmark-iterations", type="int", default=100, help="Iterations of benchmark to run") parser.add_option("-p", "--sample-ratio", type="float", default=2, help="Sample ratio for unconstrained tasks") parser.add_option("-q", "--sample-ratio-constrained", type=int, default=2, help="Sample ratio for constrained tasks") parser.add_option("-y", "--kill-delay", type="int", default=1, help="Time to wait between killing backends and frontends") parser.add_option("-v", "--inter-query-delay", type="int", default=100, help="How many ms to wait between shark queries") parser.add_option("-m", "--scheduler", type="string", default="sparrow", help="Which scheduler to use for running spark (mesos/sparrow)") parser.add_option("--spot-price", type="float", default=None, help="If specified, launch slaves as spot instances with the given " + "maximum price (in dollars). To see current spot prices, visit " "http://aws.amazon.com/ec2/spot-instances/#7") parser.add_option("--cpus", type="int", default=4, help="Number of cpus on the machine, used to determine how many concurrent tasks " "to run") parser.add_option("--frontend-type", type="string", default="ProtoFrontend", help="Classname (not fully qualified!) of the frontend to use") parser.add_option("-r", "--parallelism", type="int", default=8, help="Level of parallelism for dummy queries.") parser.add_option("-u", "--num_partitions", type="int", default=1, help="Number of partitions for shark tables.") parser.add_option("--reduce-tasks", type="int", default=5, help="Number of reduce tasks to use for Shark queries.") parser.add_option("--spark-backend-mem", default="2g", help="Amount of memory to give spark backends."), parser.add_option("--scale-factor", default="2.5", help="Scale factor to use when creating TPCH database (used with create-database)") parser.add_option("--total-cores", default="200", help="Total number of cores in the cluster (used to determine launch rate for " "throughput experiments)") (opts, args) = parser.parse_args() if len(args) < 2 and force_action: parser.print_help() sys.exit(1) if os.getenv('AWS_ACCESS_KEY_ID') == None: print >> sys.stderr, ("ERROR: The environment variable AWS_ACCESS_KEY_ID " + "must be set") sys.exit(1) if os.getenv('AWS_SECRET_ACCESS_KEY') == None: print >> sys.stderr, ("ERROR: The environment variable " + "AWS_SECRET_ACCESS_KEY must be set") sys.exit(1) return (opts, args) # Get the EC2 security group of the given name, creating it if it doesn't exist def get_or_make_group(conn, name): groups = conn.get_all_security_groups() group = [g for g in groups if g.name == name] if len(group) > 0: return group[0] else: print "Creating security group " + name return conn.create_security_group(name, "Sparrow EC2 group") # Copy a file to a given host through scp, throwing an exception if scp fails def scp(host, opts, local_file, dest_file): subprocess.check_call( "scp -q -o StrictHostKeyChecking=no -i %s '%s' 'root@%s:%s'" % (opts.identity_file, local_file, host, dest_file), shell=True) # Copy a file from a given host through scp, throwing an exception if scp fails def scp_from(host, opts, dest_file, local_file): subprocess.check_call( "scp -q -o StrictHostKeyChecking=no -i %s 'root@%s:%s' '%s'" % (opts.identity_file, host, dest_file, local_file), shell=True) def rsync_from_all(hosts, opts, dest_pattern, local_dir, errors=0): commands = [] for host in hosts: cmd = "rsync -rv -e 'ssh -o StrictHostKeyChecking=no -i %s' root@%s: --include=\"%s\" --exclude=\"*\" %s" % ( opts.identity_file, host, dest_pattern, local_dir) commands.append(cmd) parallel_commands(commands, errors) # Execute a sequence of commands in parallel, raising an exception if # more than tolerable_failures of them fail def parallel_commands(commands, tolerable_failures): processes = {} # popen object --> command string failures = [] for c in commands: p = subprocess.Popen(c, shell=True, stdout = subprocess.PIPE, stderr = subprocess.PIPE, stdin=subprocess.PIPE) processes[p] = c for p in processes.keys(): (stdout, stderr) = p.communicate() if p.poll() != 0: failures.append((stdout, stderr, processes[p])) print stdout if len(failures) > tolerable_failures: out = "Parallel commands failed:\n" for (stdout, stderr, cmd) in failures: out = out + "command:\n%s\nstdout\n%sstderr\n%s\n" % \ (cmd, stdout, stderr) raise Exception(out) # Run a command on a host through ssh, throwing an exception if ssh fails def ssh(host, opts, command): subprocess.check_call( "ssh -t -o StrictHostKeyChecking=no -i %s root@%s '%s'" % (opts.identity_file, host, command), shell=True) # Run a command on multiple hosts through ssh, throwing an exception on failure def ssh_all(hosts, opts, command): commands = [] for host in hosts: cmd = "ssh -t -o StrictHostKeyChecking=no -i %s root@%s '%s'" % \ (opts.identity_file, host, command) commands.append(cmd) parallel_commands(commands, 0) # Launch a cluster and return instances launched def launch_cluster(conn, opts, cluster_name): backend_group = get_or_make_group(conn, "%s-backends" % cluster_name) frontend_group = get_or_make_group(conn, "%s-frontends" % cluster_name) groups = [backend_group, frontend_group] for group in groups: if group.rules == []: # Group was now just created # Allow all access from all other sparrow machines for group2 in groups: group.authorize(src_group=group2) # Allow some access from all machines group.authorize('tcp', 22, 22, '0.0.0.0/0') print "Launching instances..." try: image = conn.get_all_images(image_ids=[opts.ami])[0] except: print >> sys.stderr, "Could not find AMI " + opts.ami sys.exit(1) if opts.spot_price != None: # Launch spot instances with the requested price. # The launch group ensures that the instances will be launched and # terminated as a set. launch_group_name = "launch-group-%s" % cluster_name req_ids = [] if opts.frontends > 0: print ("Requesting %d frontends as spot instances with price $%.3f" % (opts.frontends, opts.spot_price)) frontend_reqs = conn.request_spot_instances( price = opts.spot_price, image_id = opts.ami, launch_group = launch_group_name, placement = opts.zone, count = opts.frontends, key_name = opts.key_pair, security_groups = [frontend_group], instance_type = opts.instance_type) req_ids += [req.id for req in frontend_reqs] if opts.backends > 0: print ("Requesting %d backends as spot instances with price $%.3f" % (opts.backends, opts.spot_price)) backend_reqs = conn.request_spot_instances( price = opts.spot_price, image_id = opts.ami, launch_group = launch_group_name, placement = opts.zone, count = opts.backends, key_name = opts.key_pair, security_groups = [backend_group], instance_type = opts.instance_type) req_ids += [req.id for req in backend_reqs] print "Waiting for spot instances to be granted..." instances_requested = opts.frontends + opts.backends try: while True: time.sleep(10) # See if all the requests have been fulfilled. reqs = conn.get_all_spot_instance_requests() active_instance_ids = [r.instance_id for r in reqs if r.id in req_ids and r.state == "active"] if len(active_instance_ids) == instances_requested: print "All %d frontends and %d backends granted" % (opts.frontends, opts.backends) break else: print ("%d of %d nodes granted; waiting longer" % (len(active_instance_ids), instances_requested)) except: print "Canceling spot instance requests" conn.cancel_spot_instance_requests(req_ids) (frontends, backends) = find_existing_cluster(conn, opts, cluster_name) running = len(frontends) + len(backends) if running: print >> sys.stderr, ("WARNING: %d instances are still running" % running) sys.exit(0) else: print "ARE YOU SURE YOU DON'T WANT TO USE SPOT INSTANCES?" frontend_res = image.run(key_name = opts.key_pair, security_groups = [frontend_group], instance_type = opts.instance_type, placement = opts.zone, min_count = opts.frontends, max_count = opts.frontends) backend_res = image.run(key_name = opts.key_pair, security_groups = [backend_group], instance_type = opts.instance_type, placement = opts.zone, min_count = opts.backends, max_count = opts.backends) print "Launched cluster with %s frontends and %s backends" % ( opts.frontends, opts.backends) # Wait for a set of launched instances to exit the "pending" state # (i.e. either to start running or to fail and be terminated) def wait_for_instances(instances): while True: for i in instances: i.update() if len([i for i in instances if i.state == 'pending']) > 0: time.sleep(5) else: return # Check whether a given EC2 instance object is in a state we consider active, # i.e. not terminating or terminated. We count both stopping and stopped as # active since we can restart stopped clusters. def is_active(instance): return (instance.state in ['pending', 'running', 'stopping', 'stopped']) def find_existing_cluster(conn, opts, cluster_name): print "Searching for existing Sparrow cluster..." reservations = conn.get_all_instances() frontend_nodes = [] backend_nodes = [] for res in reservations: active = [i for i in res.instances if is_active(i)] if len(active) > 0: group_names = [g.name for g in res.groups] if group_names == ["%s-frontends" % cluster_name]: frontend_nodes += res.instances elif group_names == ["%s-backends" % cluster_name]: backend_nodes += res.instances if frontend_nodes != [] and backend_nodes != []: print ("Found %d frontend and %s backend nodes" % (len(frontend_nodes), len(backend_nodes))) print "Frontends:" frontend_nodes = filter(lambda k: k.public_dns_name != "", frontend_nodes) for fe in frontend_nodes: print fe.public_dns_name print "Backends:" backend_nodes = filter(lambda k: k.public_dns_name != "", backend_nodes) for be in backend_nodes: print be.public_dns_name return (frontend_nodes, backend_nodes) else: print "ERROR: Could not find full cluster named %s: fe=%s be=%s" % ( cluster_name, frontend_nodes, backend_nodes) sys.exit(1) """ Replaces all of the variables in the tempate files, based on opts. Returns the name of the directory with all of the files that need to be deployed. """ def generate_deploy_files(frontends, backends, opts, warmup_job_arrival_s, warmup_s, post_warmup_s, nm_task_scheduler, users): # Replace template vars tmp_dir = tempfile.mkdtemp() template_vars = { "frontend_list": "\n".join(["%s" % i.public_dns_name \ for i in frontends]), \ "sparrow_schedulers": "\n".join(["sparrow@%s:20503" % i.private_ip_address \ for i in frontends]), \ "static_backends": ",".join(["%s:20502" % i.public_dns_name \ for i in backends]), "name_node": frontends[0].public_dns_name, "backend_list": "\n".join(["%s" % i.public_dns_name \ for i in backends]), "backend_comma_joined_list": ",".join(["%s" % i.public_dns_name \ for i in backends]), "arrival_lambda": "%s" % opts.arrival_rate, "git_branch": "%s" % opts.branch, "spark_git_branch": "%s" % opts.spark_branch, "benchmark_iterations": "%s" % opts.benchmark_iterations, "benchmark_id": "%s" % opts.benchmark_id, "tasks_per_job": "%s" % opts.tasks_per_job, "num_preferred_nodes": "%s" % opts.num_preferred_nodes, "sample_ratio": "%s" % opts.sample_ratio, "sample_ratio_constrained": "%s" % opts.sample_ratio_constrained, "warmup_job_arrival_rate_s": "%s" % warmup_job_arrival_s, "warmup_s": "%s" % warmup_s, "post_warmup_s": "%s" % post_warmup_s, "node_monitor_task_scheduler": "%s" % nm_task_scheduler, "num_partitions": "%s" % opts.num_partitions, "reduce_tasks": "%s" % (opts.reduce_tasks), "inter_query_delay": "%s" % opts.inter_query_delay, "users": users, "frontend_type": opts.frontend_type, "cpus": "%s" % opts.cpus, "total_cores": "%s" % opts.total_cores, "spark_backend_mem": "%s" % opts.spark_backend_mem } for dirpath, dirnames, filenames in os.walk("template"): rel_dir_path=dirpath.replace("template", "") if rel_dir_path.startswith(os.sep): rel_dir_path = rel_dir_path[1:] if rel_dir_path != "": os.mkdir(os.path.join(tmp_dir, rel_dir_path)) for filename in filenames: if filename[0] not in '#.~' and filename[-1] != '~': local_file = os.path.join(tmp_dir, rel_dir_path, filename) with open(os.path.join(dirpath, filename)) as src: with open(local_file, "w") as dest: text = src.read() for key in template_vars: text = text.replace("{{" + key + "}}", template_vars[key]) dest.write(text) dest.close() return tmp_dir # Deploy Sparrow configuration on a launched cluster (but don't rebuild). def redeploy_sparrow(machines, frontends, backends, opts, warmup_job_arrival_s=0, warmup_s=0, post_warmup_s=0, nm_task_scheduler="fifo", users="user0:1:0"): # Replace template vars tmp_dir = generate_deploy_files(frontends, backends, opts, warmup_job_arrival_s, warmup_s, post_warmup_s, nm_task_scheduler, users) for machine in machines: print "Copying files to: %s ..." % machine.public_dns_name # Rsync this to one machine command = (("rsync -rv -e 'ssh -o StrictHostKeyChecking=no -i %s' " + "'%s/' 'root@%s:~/'") % (opts.identity_file, tmp_dir, machine.public_dns_name)) subprocess.check_call(command, shell=True) # Deploy Sparrow binaries and configuration on a launched cluster def deploy_cluster(frontends, backends, opts, warmup_job_arrival_s=0, warmup_s=0, post_warmup_s=0, nm_task_scheduler="fifo", users="user0:1:0"): # Replace template vars tmp_dir = generate_deploy_files(frontends, backends, opts, warmup_job_arrival_s, warmup_s, post_warmup_s, nm_task_scheduler, users) driver_machine = frontends[0].public_dns_name print "Chose driver machine: %s ..." % driver_machine # Rsync this to one machine command = (("rsync -rv -e 'ssh -o StrictHostKeyChecking=no -i %s' " + "'%s/' 'root@%s:~/'") % (opts.identity_file, tmp_dir, driver_machine)) subprocess.check_call(command, shell=True) # Remove the temp directory we created above shutil.rmtree(tmp_dir) print "Copying SSH key %s to driver..." % opts.identity_file ssh(driver_machine, opts, 'mkdir -p /root/.ssh') scp(driver_machine, opts, opts.identity_file, '/root/.ssh/id_rsa') print "Building sparrow on driver machine..." ssh(driver_machine, opts, "chmod 755 /root/*.sh;" "/root/build_sparrow.sh;") print "Deploying sparrow to other machines..." ssh(driver_machine, opts, "/root/deploy_sparrow.sh") def start_sparrow_throughput(frontends, backends, opts): start_sparrow(frontends, backends, opts) start_spark_shark(frontends, backends, opts) ssh_all([fe.public_dns_name for fe in frontends], opts, "/root/start_throughput_exp_sparrow.sh") def start_sparrow(frontends, backends, opts): all_machines = [] for fe in frontends: all_machines.append(fe.public_dns_name) for be in backends: all_machines.append(be.public_dns_name) print "Starting sparrow on all machines..." ssh_all(all_machines, opts, "/root/start_sparrow.sh;") def stop_sparrow(frontends, backends, opts): all_machines = [] for fe in frontends: all_machines.append(fe.public_dns_name) for be in backends: all_machines.append(be.public_dns_name) print "Stopping sparrow on all machines..." ssh_all(all_machines, opts, "/root/stop_sparrow.sh;") def start_mesos(frontends, backends, opts): print "Starting mesos master..." ssh(frontends[0].public_dns_name, opts, "/root/start_mesos_master.sh;") print "Starting mesos slaves..." ssh_all([be.public_dns_name for be in backends], opts, "/root/start_mesos_slave.sh") def stop_mesos(frontends, backends, opts): print "Stopping mesos slaves..." ssh_all([be.public_dns_name for be in backends], opts, "/root/stop_mesos_slave.sh") print "Stopping mesos master..." ssh(frontends[0].public_dns_name, opts, "/root/stop_mesos_master.sh") """ Starts spark backends only to allow shark shell to launch. """ def start_spark_shark(frontends, backends, opts): if opts.scheduler != "sparrow": print "ERROR: shark only supported w/ sparrow scheduler" return print "Starting Spark backends..." ssh_all([be.public_dns_name for be in backends], opts, "/root/start_spark_backend.sh") def stop_spark(frontends, backends, opts): print "Stopping spark frontends..." ssh_all([fe.public_dns_name for fe in frontends], opts, "/root/stop_spark_frontend.sh") time.sleep(opts.kill_delay) print "Stopping spark backends..." ssh_all([be.public_dns_name for be in backends], opts, "/root/stop_spark_backend.sh") def start_hdfs(frontends, backends, opts): print "Starting HDFS" ssh(frontends[0].public_dns_name, opts, 'HADOOP_SSH_OPTS="-o StrictHostKeyChecking=no" /opt/hadoop/bin/start-dfs.sh') def stop_hdfs(frontends, backends,opts): print "Stopping HDFS" ssh(frontends[0].public_dns_name, opts, 'HADOOP_SSH_OPTS="-o StrictHostKeyChecking=no" /opt/hadoop/bin/stop-dfs.sh') # Start the prototype backends/frontends def start_proto(frontends, backends, opts): print "Starting Proto backends..." ssh_all([be.public_dns_name for be in backends], opts, "/root/start_proto_backend.sh") print "Starting Proto frontends..." ssh_all([fe.public_dns_name for fe in frontends], opts, "/root/start_proto_frontend.sh") # Start the prototype backends/frontends def stop_proto(frontends, backends, opts): print "Stopping Proto frontends..." ssh_all([fe.public_dns_name for fe in frontends], opts, "/root/stop_proto_frontend.sh") time.sleep(opts.kill_delay) print "Stopping Proto backends..." ssh_all([be.public_dns_name for be in backends], opts, "/root/stop_proto_backend.sh") def create_database(frontends, opts): scale_factor = opts.scale_factor print "Creating TPCH database in HDFS on primary node with scale factor " + scale_factor ssh(frontends[0].public_dns_name, opts, "/root/create_database.sh %s" % scale_factor) def create_tpch_tables(frontends, backends, opts): print "Creating tables on primary node (takes longer)" ssh(frontends[0].public_dns_name, opts, "/root/create_tpch_tables_primary.sh") print "Creating table on other nodes" ssh_all([fe.public_dns_name for fe in frontends[1:]], opts, "/root/create_tpch_tables_secondary.sh") def start_shark_tpch(frontends, backends, opts): print "Starting Shark/TPCH workloads" ssh_all([fe.public_dns_name for fe in frontends], opts, "/root/start_shark_tpch.sh") # Collect logs from all machines def collect_logs(frontends, backends, opts): print "Zipping logs..." ssh_all([fe.public_dns_name for fe in frontends], opts, "/root/prepare_logs.sh") ssh_all([be.public_dns_name for be in backends], opts, "/root/prepare_logs.sh") print "Hauling logs" rsync_from_all([fe.public_dns_name for fe in frontends], opts, "*.log.gz", opts.log_dir, len(frontends)) rsync_from_all([be.public_dns_name for be in backends], opts, "*.log.gz", opts.log_dir, len(backends)) # f = open(os.path.join(opts.log_dir, "params.txt"), 'w') # for (k, v) in opts.__dict__.items(): # f.write("%s\t%s\n" % (k, v)) # f.close() ssh_all([fe.public_dns_name for fe in frontends], opts, "rm -f /tmp/*audit*.log.gz; mv /root/*log.gz /tmp;") ssh_all([be.public_dns_name for be in backends], opts, "rm -f /tmp/*audit*.log.gz; mv /root/*log.gz /tmp;") # Tear down a cluster def destroy_cluster(frontends, backends, opts): response = raw_input("Are you sure you want to destroy the cluster " + "?\nALL DATA ON ALL NODES WILL BE LOST!!\n" + "Destroy cluster (y/N): ") if response == "y": print "Terminating frontends" for fe in frontends: fe.terminate() print "Terminating backends" for be in backends: be.terminate() # Execute a shell command on all machines def execute_command(frontends, backends, opts, cmd): ssh_all([fe.public_dns_name for fe in frontends], opts, cmd) ssh_all([be.public_dns_name for be in backends], opts, cmd) # Login to a random frontend def login_frontend(frontends, backends, opts): node = frontends[0].public_dns_name print "Logging into a frontend " + node subprocess.check_call("ssh -o StrictHostKeyChecking=no -i %s root@%s" % (opts.identity_file, node), shell=True) # Login to a random backend def login_backend(frontends, backends, opts): node = backends[0].public_dns_name print "Logging into a backend " + node subprocess.check_call("ssh -o StrictHostKeyChecking=no -i %s root@%s" % (opts.identity_file, node), shell=True) def main(): (opts, args) = parse_args() conn = boto.connect_ec2() action = args[0] cluster = args[1] if action == "launch": launch_cluster(conn, opts, cluster) return if action == "command" and len(args) < 3: print "Command action requires command string" # Wait until ec2 says the cluster is started, then possibly wait more time # to make sure all nodes have booted. (frontends, backends) = find_existing_cluster(conn, opts, cluster) print "Waiting for instances to start up" wait_for_instances(frontends) wait_for_instances(backends) print "Waiting %d more seconds..." % opts.wait time.sleep(opts.wait) print "Executing action: %s" % action if action == "command": cmd = " ".join(args[2:]) execute_command(frontends, backends, opts, cmd) elif action == "deploy": deploy_cluster(frontends, backends, opts) elif action == "start-sparrow": start_sparrow(frontends, backends, opts) elif action == "stop-sparrow": stop_sparrow(frontends, backends, opts) elif action == "start-sparrow-throughput": # Starts a throughput testing experiment using Sparrow. start_sparrow_throughput(frontends, backends, opts) elif action == "start-mesos": start_mesos(frontends, backends, opts) elif action == "stop-mesos": stop_mesos(frontends, backends, opts) elif action == "start-spark-shark": start_spark_shark(frontends, backends, opts) elif action == "stop-spark": stop_spark(frontends, backends, opts) elif action == "restart-spark-shark": stop_spark(frontends, backends, opts) stop_sparrow(frontends, backends, opts) start_sparrow(frontends, backends, opts) start_spark_shark(frontends, backends, opts) elif action == "start-proto": start_proto(frontends, backends, opts) elif action == "stop-proto": stop_proto(frontends, backends, opts) elif action == "start-hdfs": start_hdfs(frontends, backends, opts) elif action == "stop-hdfs": stop_hdfs(frontends, backends, opts) elif action == "collect-logs": collect_logs(frontends, backends, opts) elif action == "destroy": destroy_cluster(frontends, backends, opts) elif action == "login-fe": login_frontend(frontends, backends, opts) elif action == "login-be": login_backend(frontends, backends, opts) elif action == "create-database": create_database(frontends, opts) elif action == "create-tpch-tables": create_tpch_tables(frontends, backends, opts) elif action == "start-shark-tpch": start_shark_tpch(frontends, backends, opts) else: print "Unknown action: %s" % action sys.exit(1) if __name__ == "__main__": main() ================================================ FILE: deploy/ec2/fairness.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import boto import os import subprocess import sys import time import ec2_exp def run_cmd(cmd): subprocess.check_call(cmd, shell=True) def main(argv): launch_instances = False if len(argv) >= 1 and argv[0] == "True": launch_instances = True utilizations = [1.0] sample_ratios = [2.0] sample_ratio_constrained = 1 # Amount of time it takes each task to run in isolation task_duration_ms = 100 tasks_per_job = 3 private_ssh_key = "patkey.pem" sparrow_branch = "master" num_backends = 100 num_frontends = 10 cores_per_backend = 4 # Run each trial for many minutes. trial_length = 700 num_preferred_nodes = 0 nm_task_scheduler = "round_robin" cluster_name = "fairness" full_utilization_rate_s = (float(num_backends * cores_per_backend * 1000) / (task_duration_ms * tasks_per_job * num_frontends)) # Warmup information warmup_s = 120 post_warmup_s = 30 warmup_arrival_rate_s = 0.4 * full_utilization_rate_s if launch_instances: print "********Launching instances..." run_cmd("./ec2-exp.sh launch %s -f %s -b %s -i %s" % (cluster_name, num_frontends, num_backends, private_ssh_key)) time.sleep(10) for sample_ratio in sample_ratios: for utilization in utilizations: arrival_rate_s = utilization * full_utilization_rate_s # This is a little bit of a hacky way to pass args to the ec2 script. (opts, args) = ec2_exp.parse_args(False) opts.identity_file = private_ssh_key opts.arrival_rate = arrival_rate_s opts.branch = sparrow_branch opts.sample_ratio = sample_ratio opts.sample_ratio_constrained = sample_ratio_constrained opts.tasks_per_job = tasks_per_job opts.num_preferred_nodes = num_preferred_nodes opts.frontend_type = "FairnessTestingFrontend" conn = boto.connect_ec2() frontends, backends = ec2_exp.find_existing_cluster(conn, opts, cluster_name) print ("********Launching experiment at utilization %s with sample ratio %s..." % (utilization, sample_ratio)) print ("********Deploying with arrival rate %s and warmup arrival rate %s" % (arrival_rate_s, warmup_arrival_rate_s)) #ec2_exp.deploy_cluster(frontends, backends, opts, warmup_arrival_rate_s, warmup_s, # post_warmup_s, nm_task_scheduler) ec2_exp.start_sparrow(frontends, backends, opts) print "*******Sleeping after starting Sparrow" time.sleep(10) print "********Starting prototype frontends and backends" ec2_exp.start_proto(frontends, backends, opts) time.sleep(trial_length) log_dirname = "/Users/keo/Documents/opportunistic-scheduling/sparrow/deploy/ec2/fairness_%s_%s" % (utilization, sample_ratio) while os.path.exists(log_dirname): log_dirname = "%s_a" % log_dirname os.mkdir(log_dirname) ec2_exp.execute_command(frontends, backends, opts, "./find_bugs.sh") print "********Stopping prototypes and Sparrow" ec2_exp.stop_proto(frontends, backends, opts) ec2_exp.stop_sparrow(frontends, backends, opts) print "********Collecting logs and placing in %s" % log_dirname opts.log_dir = log_dirname ec2_exp.collect_logs(frontends, backends, opts) run_cmd("gunzip %s/*.gz" % log_dirname) print "********Parsing logs" run_cmd(("cd ../../src/main/python/ && ./parse_logs.sh log_dir=%s " "output_dir=%s/results start_sec=240 end_sec=540 && cd -") % (log_dirname, log_dirname)) if __name__ == "__main__": main(sys.argv[1:]) ================================================ FILE: deploy/ec2/fairness.sh ================================================ #!/bin/sh # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # cd "`dirname $0`" PYTHONPATH="$PYTHONPATH:../third_party/boto-2.1.1" python ./fairness.py $@ ================================================ FILE: deploy/ec2/isolation.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import boto import os import subprocess import sys import time import ec2_exp def run_cmd(cmd): subprocess.check_call(cmd, shell=True) def main(argv): launch_instances = False if len(argv) >= 1 and argv[0] == "True": launch_instances = True utilization_user_pairs = [(0.25, "high:1:0"), (0.5, "high:1:0,low:1:0"), (0.75, "high:1:0,low:2:0"), (1.0, "high:1:0,low:3:0"), (1.25, "high:1:0,low:4:0"), (1.5, "high:1:0,low:5:0"), (1.75, "high:1:0,low:6:0"), (2.0, "high:1:0,low:7:0")] sample_ratios = [2.0] sample_ratio_constrained = 1 # Amount of time it takes each task to run in isolation task_duration_ms = 100 tasks_per_job = 1 private_ssh_key = "patkey.pem" sparrow_branch = "debugging" num_backends = 5 num_frontends = 1 cores_per_backend = 4 # Run each trial for 5 minutes. trial_length = 500 num_preferred_nodes = 0 nm_task_scheduler = "priority" cluster_name = "isolation" full_utilization_rate_s = (float(num_backends * cores_per_backend * 1000) / (task_duration_ms * tasks_per_job * num_frontends)) # Warmup information warmup_s = 120 post_warmup_s = 30 warmup_arrival_rate_s = 0.4 * full_utilization_rate_s if launch_instances: print "********Launching instances..." run_cmd(("./ec2-exp.sh launch %s --ami ami-a658c0cf " + "--instance-type cr1.8xlarge --spot-price %s -f %s -b %s -i %s") % (cluster_name, 0.5, num_frontends, num_backends, private_ssh_key)) time.sleep(10) for sample_ratio in sample_ratios: for utilization, users in utilization_user_pairs: arrival_rate_s = utilization * full_utilization_rate_s # This is a little bit of a hacky way to pass args to the ec2 script. (opts, args) = ec2_exp.parse_args(False) opts.identity_file = private_ssh_key opts.arrival_rate = arrival_rate_s opts.branch = sparrow_branch opts.sample_ratio = sample_ratio opts.sample_ratio_constrained = sample_ratio_constrained opts.tasks_per_job = tasks_per_job opts.num_preferred_nodes = num_preferred_nodes opts.cpus = cores_per_backend conn = boto.connect_ec2() frontends, backends = ec2_exp.find_existing_cluster(conn, opts, cluster_name) print ("********Launching experiment at utilization %s with sample ratio %s..." % (utilization, sample_ratio)) print ("********Deploying with arrival rate %s and warmup arrival rate %s" % (arrival_rate_s, warmup_arrival_rate_s)) ec2_exp.deploy_cluster(frontends, backends, opts, warmup_arrival_rate_s, warmup_s, post_warmup_s, nm_task_scheduler, users) ec2_exp.start_sparrow(frontends, backends, opts) print "*******Sleeping after starting Sparrow" time.sleep(10) print "********Starting prototype frontends and backends" ec2_exp.start_proto(frontends, backends, opts) time.sleep(trial_length) log_dirname = "/disk1/sparrow/isolation_%s_%s" % (utilization, sample_ratio) while os.path.exists(log_dirname): log_dirname = "%s_a" % log_dirname os.mkdir(log_dirname) ec2_exp.execute_command(frontends, backends, opts, "./find_bugs.sh") print "********Stopping prototypes and Sparrow" ec2_exp.stop_proto(frontends, backends, opts) ec2_exp.stop_sparrow(frontends, backends, opts) print "********Collecting logs and placing in %s" % log_dirname opts.log_dir = log_dirname ec2_exp.collect_logs(frontends, backends, opts) run_cmd("gunzip %s/*.gz" % log_dirname) print "********Parsing logs" run_cmd(("cd /tmp/sparrow/src/main/python/ && ./parse_logs.sh log_dir=%s " "output_dir=%s/results start_sec=350 end_sec=450 && cd -") % (log_dirname, log_dirname)) if __name__ == "__main__": main(sys.argv[1:]) ================================================ FILE: deploy/ec2/isolation.sh ================================================ #!/bin/sh # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # cd "`dirname $0`" PYTHONPATH="$PYTHONPATH:../third_party/boto-2.1.1" python ./isolation.py $@ ================================================ FILE: deploy/ec2/osdi.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import os import subprocess import time def run_cmd(cmd): subprocess.check_call(cmd, shell=True) # 50-node: q1, 3.5, par 10, sf .5 = 60% utilization # 50-node: q6, 4, par 10, sf .5 = 60% utilization # 50-node: q3, 2, par 10, sf .5 = 50% utilization # 100-node: q6 (think I ran at 4ps) # 100-node: q3 trial_length = 300 ratios = [(2, 2)] rates = [1] tpch_query = 1 par_level = 20 for ratio in ratios: for rate in rates: run_cmd("./ec2-exp.sh stop-sparrow -i ~/.ssh/eastkey.pem") run_cmd("./ec2-exp.sh stop-spark -i ~/.ssh/eastkey.pem") 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])) run_cmd("./ec2-exp.sh start-sparrow -i ~/.ssh/eastkey.pem") time.sleep(30) max_queries = int(trial_length * rate) run_cmd("./ec2-exp.sh start-spark -i ~/.ssh/eastkey.pem -m " "sparrow -v %s -j %s -o %s -r %s" % (rate, max_queries, tpch_query, par_level)) dirname = "%s_%s_%s" % (ratio[0], ratio[1], rate) if not os.path.exists(dirname): os.mkdir(dirname) time.sleep(trial_length + 130) run_cmd("./ec2-exp.sh collect-logs -i ~/.ssh/eastkey.pem --log-dir=%s/" % dirname) run_cmd("cd %s && gunzip *.gz && cd -" % dirname) ================================================ FILE: deploy/ec2/prepare_tpch_experiments.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import os import subprocess import sys import time def run_cmd(cmd): subprocess.check_call(cmd, shell=True) def main(argv): if len(argv) != 3 and len(argv) != 1: print "Usage: python prepare_tpch_experiments.py [opt: num_frontends num_backends]" print "Specifying num_frontends and num_backends will cause a cluster to be launched" return cluster_name = "tpch" key_loc = "patkey.pem" if len(argv) == 3: num_frontends = argv[1] num_backends = argv[2] print "Launching %s frontends and %s backends" % (num_frontends, num_backends) # add --spot-price=foo for spot pricing launch_cmd = ("./ec2-exp.sh -t m2.4xlarge --spot-price=2.00 -a ami-533a733a -i %s launch %s -f %s -b %s" % (key_loc, cluster_name, num_frontends, num_backends)) #launch_cmd = ("./ec2-exp.sh -t cr1.8xlarge --spot-price=2.00 -a ami-894801e0 -i %s launch %s -f %s -b %s" % # (key_loc, cluster_name, num_frontends, num_backends)) run_cmd(launch_cmd) print "Sleeping for 1 minute after launching machines" time.sleep(60) print "***********Attempting to stop HDFS" stop_hdfs_cmd = "./ec2-exp.sh -i %s stop-hdfs %s" % (key_loc, cluster_name) run_cmd(stop_hdfs_cmd) print "***********Deploying Code and Config Files" backend_mem="10g" deploy_cmd = "./ec2-exp.sh -i %s deploy %s --spark-backend-mem %s" % (key_loc, cluster_name, backend_mem) run_cmd(deploy_cmd) print "***********Starting HDFS" hdfs_cmd = "./ec2-exp.sh -i %s start-hdfs %s" % (key_loc, cluster_name) run_cmd(hdfs_cmd) scale_factor = 2 print "***********Creating database" create_db_cmd = ("./ec2-exp.sh -i %s create-database %s --scale-factor %s" % (key_loc, cluster_name, scale_factor)) # This returns a non-zero exit code if some of the directorys already exist, which is # not an error we care about. subprocess.call(create_db_cmd, shell=True) print "***********Starting Sparrow (needed for creating denormalized Hive tables)" restart_cmd = "./ec2-exp.sh -i %s restart-spark-shark %s" % (key_loc, cluster_name) run_cmd(restart_cmd) print "***********Creating TPCH Tables in Shark" create_tables_cmd = "./ec2-exp.sh -i %s create-tpch-tables %s " % (key_loc, cluster_name) run_cmd(create_tables_cmd) if __name__ == "__main__": main(sys.argv) ================================================ FILE: deploy/ec2/prepare_tpch_experiments.sh ================================================ #!/bin/sh # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # cd "`dirname $0`" PYTHONPATH="$PYTHONPATH:../third_party/boto-2.1.1" python ./prepare_tpch_experiments.py $@ ================================================ FILE: deploy/ec2/probe-ratio-het.sh ================================================ #!/bin/sh # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # cd "`dirname $0`" PYTHONPATH="$PYTHONPATH:../third_party/boto-2.1.1" python ./probe_ratio_het.py $@ ================================================ FILE: deploy/ec2/probe-ratio.sh ================================================ #!/bin/sh # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # cd "`dirname $0`" PYTHONPATH="$PYTHONPATH:../third_party/boto-2.1.1" python ./probe_ratio.py $@ ================================================ FILE: deploy/ec2/probe_ratio.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import boto import os import subprocess import sys import time import ec2_exp def run_cmd(cmd): subprocess.check_call(cmd, shell=True) def main(argv): launch_instances = False if len(argv) >= 1 and argv[0] == "True": launch_instances = True utilizations = [0.8, 0.9] sample_ratios = [1, 1.1, 1.2, 1.5, 2.0, 3.0] sample_ratio_constrained = 2 # Amount of time it takes each task to run in isolation task_duration_ms = 100 tasks_per_job = 10 private_ssh_key = "patkey.pem" sparrow_branch = "master" nm_task_scheduler = "fifo" num_backends = 100 num_frontends = 10 cores_per_backend = 8 # Run each trial for 5 minutes. trial_length = 400 num_preferred_nodes = 0 num_users = 1 cluster = "probe" full_utilization_rate_s = (float(num_backends * cores_per_backend * 1000) / (task_duration_ms * tasks_per_job * num_frontends)) # Warmup information warmup_s = 30 post_warmup_s = 30 warmup_arrival_rate_s = 0.4 * full_utilization_rate_s if launch_instances: print "********Launching instances..." run_cmd("./ec2-exp.sh launch %s -f %s -b %s -i %s" % # --spot-price %s" % (cluster, num_frontends, num_backends, private_ssh_key)) time.sleep(10) for sample_ratio in sample_ratios: for utilization in utilizations: arrival_rate_s = utilization * full_utilization_rate_s # This is a little bit of a hacky way to pass args to the ec2 script. (opts, args) = ec2_exp.parse_args(False) opts.identity_file = private_ssh_key opts.arrival_rate = arrival_rate_s opts.branch = sparrow_branch opts.sample_ratio = sample_ratio opts.sample_ratio_constrained = sample_ratio_constrained opts.tasks_per_job = tasks_per_job opts.num_preferred_nodes = num_preferred_nodes opts.cpus = cores_per_backend conn = boto.connect_ec2() frontends, backends = ec2_exp.find_existing_cluster(conn, opts, cluster) print ("********Launching experiment at utilization %s with sample ratio %s..." % (utilization, sample_ratio)) print ("********Deploying with arrival rate %s and warmup arrival rate %s" % (arrival_rate_s, warmup_arrival_rate_s)) ec2_exp.deploy_cluster(frontends, backends, opts, warmup_arrival_rate_s, warmup_s, post_warmup_s, nm_task_scheduler) ec2_exp.start_sparrow(frontends, backends, opts) print "*******Sleeping after starting Sparrow" time.sleep(10) print "********Starting prototype frontends and backends" ec2_exp.start_proto(frontends, backends, opts) time.sleep(trial_length) log_dirname = "/home/ec2-user/sparrow/deploy/ec2/probe_ratio_%s_%s" % (utilization, sample_ratio) while os.path.exists(log_dirname): log_dirname = "%s_a" % log_dirname os.mkdir(log_dirname) ec2_exp.execute_command(frontends, backends, opts, "./find_bugs.sh") print "********Stopping prototypes and Sparrow" ec2_exp.stop_proto(frontends, backends, opts) ec2_exp.stop_sparrow(frontends, backends, opts) print "********Collecting logs and placing in %s" % log_dirname opts.log_dir = log_dirname ec2_exp.collect_logs(frontends, backends, opts) #run_cmd("gunzip %s/*.gz" % log_dirname) #print "********Parsing logs" #run_cmd(("cd ../../src/main/python/ && ./parse_logs.sh log_dir=%s " # "output_dir=%s/results start_sec=350 end_sec=450 && cd -") % # (log_dirname, log_dirname)) if __name__ == "__main__": main(sys.argv[1:]) ================================================ FILE: deploy/ec2/probe_ratio_het.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import boto import os import subprocess import sys import time import ec2_exp def run_cmd(cmd): subprocess.check_call(cmd, shell=True) def main(argv): launch_instances = False if len(argv) >= 1 and argv[0] == "True": launch_instances = True utilizations = [0.8, 0.9] sample_ratios = [1.1, 1.2, 1.5, 2.0, 3.0] sample_ratio_constrained = 2 # Amount of time it takes each task to run in isolation task_duration_ms = 100 tasks_per_job = 10 private_ssh_key = "patkey.pem" sparrow_branch = "master" nm_task_scheduler = "fifo" num_backends = 100 num_frontends = 10 cores_per_backend = 8 # Run each trial for 5 minutes. trial_length = 400 num_preferred_nodes = 0 num_users = 1 cluster = "probe" full_utilization_rate_s = (float(num_backends * cores_per_backend * 1000) / (task_duration_ms * tasks_per_job * num_frontends)) # Warmup information warmup_s = 120 post_warmup_s = 30 warmup_arrival_rate_s = 0.4 * full_utilization_rate_s if launch_instances: print "********Launching instances..." run_cmd("./ec2-exp.sh launch %s -f %s -b %s -i %s" % # --spot-price %s" % (cluster, num_frontends, num_backends, private_ssh_key)) time.sleep(10) for sample_ratio in sample_ratios: for utilization in utilizations: arrival_rate_s = utilization * full_utilization_rate_s # This is a little bit of a hacky way to pass args to the ec2 script. (opts, args) = ec2_exp.parse_args(False) opts.identity_file = private_ssh_key opts.arrival_rate = arrival_rate_s opts.branch = sparrow_branch opts.sample_ratio = sample_ratio opts.sample_ratio_constrained = sample_ratio_constrained opts.tasks_per_job = tasks_per_job opts.num_preferred_nodes = num_preferred_nodes opts.cpus = cores_per_backend opts.benchmark_iterations = 100 conn = boto.connect_ec2() frontends, backends = ec2_exp.find_existing_cluster(conn, opts, cluster) print ("********Launching experiment at utilization %s with sample ratio %s..." % (utilization, sample_ratio)) print ("********Deploying with arrival rate %s and warmup arrival rate %s" % (arrival_rate_s, warmup_arrival_rate_s)) ec2_exp.deploy_cluster(frontends, backends, opts, warmup_arrival_rate_s, warmup_s, post_warmup_s, nm_task_scheduler) # Redeploy on half of the frontends with a longer duration for each task and a correspondingly # lower arrival rate. opts.arrival_rate = arrival_rate_s / 100. opts.benchmark_iterations = 10000 ec2_exp.redeploy_sparrow(frontends[:5], backends, opts, warmup_arrival_rate_s / 100., warmup_s, post_warmup_s, nm_task_scheduler) ec2_exp.start_sparrow(frontends, backends, opts) print "*******Sleeping after starting Sparrow" time.sleep(10) print "********Starting prototype frontends and backends" ec2_exp.start_proto(frontends, backends, opts) time.sleep(trial_length) log_dirname = "/home/ec2-user/sparrow/deploy/ec2/probe_ratio_%s_%s" % (utilization, sample_ratio) while os.path.exists(log_dirname): log_dirname = "%s_a" % log_dirname os.mkdir(log_dirname) ec2_exp.execute_command(frontends, backends, opts, "./find_bugs.sh") print "********Stopping prototypes and Sparrow" ec2_exp.stop_proto(frontends, backends, opts) ec2_exp.stop_sparrow(frontends, backends, opts) print "********Collecting logs and placing in %s" % log_dirname opts.log_dir = log_dirname ec2_exp.collect_logs(frontends, backends, opts) #run_cmd("gunzip %s/*.gz" % log_dirname) #print "********Parsing logs" #run_cmd(("cd ../../src/main/python/ && ./parse_logs.sh log_dir=%s " # "output_dir=%s/results start_sec=350 end_sec=450 && cd -") % # (log_dirname, log_dirname)) if __name__ == "__main__": main(sys.argv[1:]) ================================================ FILE: deploy/ec2/spark_v_mesos.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import os import subprocess import time def run_cmd(cmd): print cmd subprocess.check_call(cmd, shell=True) trial_length = 400 probe_ratio = (2, 2) query_nums = [7000] query_par = 10 scheds = ["sparrow"] # STOP ALL THE THINGS run_cmd("./ec2-exp.sh stop-spark -i ~/.ssh/eastkey.pem") run_cmd("./ec2-exp.sh stop-sparrow -i ~/.ssh/eastkey.pem") run_cmd("./ec2-exp.sh stop-mesos -i ~/.ssh/eastkey.pem") for task_length in query_nums: rate = float(1000) / task_length # WAS 2000! but went from 5->10 nodes for sched in scheds: 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])) run_cmd("./ec2-exp.sh start-%s -i ~/.ssh/eastkey.pem" % sched) # time.sleep(30) max_queries = int(trial_length * rate) run_cmd("./ec2-exp.sh start-spark -i ~/.ssh/eastkey.pem " "-v %s -j %s -o %s -r %s -m %s" % (rate, max_queries, task_length, query_par, sched)) dirname = "race/%s_%s" % (sched, task_length) if not os.path.exists(dirname): os.mkdir(dirname) time.sleep(trial_length + 20) run_cmd("./ec2-exp.sh collect-logs -i ~/.ssh/eastkey.pem --log-dir=%s/" % dirname) run_cmd("cd %s && gunzip *.gz && cd -" % dirname) run_cmd("./ec2-exp.sh stop-spark -i ~/.ssh/eastkey.pem") run_cmd("./ec2-exp.sh stop-%s -i ~/.ssh/eastkey.pem" % sched) ================================================ FILE: deploy/ec2/template/README ================================================ All files in this folder are copied to each remote Sparrow node, with any variables filled in by the EC2 install script. ================================================ FILE: deploy/ec2/template/backends.txt ================================================ {{backend_list}} ================================================ FILE: deploy/ec2/template/build_sparrow.sh ================================================ #!/bin/bash # Build Sparrow locally SPARROW_INSTALL_DIR=~/sparrow/ SPARK_INSTALL_DIR=~/spark/ SHARK_INSTALL_DIR=~/shark/ chmod 755 ~/*.sh if [ ! -d "$SPARROW_INSTALL_DIR" ]; then mkdir $SPARROW_INSTALL_DIR fi; if [ ! -d "$SPARK_INSTALL_DIR" ]; then mkdir $SPARK_INSTALL_DIR fi; if [ ! -d "$SHARK_INSTALL_DIR" ]; then mkdir $SHARK_INSTALL_DIR fi; cd /tmp/ if [ ! -d "sparrow" ]; then git clone git://github.com/radlab/sparrow.git -b {{git_branch}} fi; if [ ! -d "spark" ]; then git clone git://github.com/kayousterhout/spark.git -b {{spark_git_branch}} fi; if [ ! -d "shark" ]; then git clone git://github.com/kayousterhout/shark.git -b sparrow fi; cd sparrow if [ ! -e "/tmp/sparrow/target/sparrow-1.0-SNAPSHOT.jar" ]; then mvn package -Dmaven.test.skip=true fi cp /tmp/sparrow/target/sparrow-1.0-SNAPSHOT.jar $SPARROW_INSTALL_DIR # Copy the Sparrow jar to a place where Spark includes it in the build. if [ ! -d "/tmp/spark/core/lib" ]; then mkdir /tmp/spark/core/lib fi cp /tmp/sparrow/target/sparrow-1.0-SNAPSHOT.jar /tmp/spark/core/lib/ cd /tmp/spark if [ ! -e "/tmp/spark/core/target/scala-2.9.1" ]; then sbt/sbt compile sbt/sbt publish-local fi # Manually download httpcore, which SBT seems to have issues with wget http://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.1.2/httpcore-4.1.2.jar HTTPCORE_DIR=/root/.m2/repository/org/apache/httpcomponents/httpcore/4.1.2 mkdir -p $HTTPCORE_DIR mv httpcore-4.1.2.jar $HTTPCORE_DIR cd /tmp/shark # Copy shark-conv into the conf/ directory, because it's needed for building. if [ ! -d "conf" ]; then mkdir conf fi cp ~/shark-env.sh conf/ if [ ! -e "/tmp/shark/target/scala-2.9.1/classes/shark/SharkEnv.class" ]; then sbt/sbt products fi # This jar could be in sparrow spark branch instead. cp /tmp/spark/core/lib/sparrow* /tmp/shark/lib cp -r /tmp/spark/* $SPARK_INSTALL_DIR cp -r /tmp/shark/* $SHARK_INSTALL_DIR ================================================ FILE: deploy/ec2/template/clean_logs.sh ================================================ #!/bin/bash rm -f /tmp/*.log rm -f /tmp/*.log.gz rm -f ~/*.log rm -f ~/*.log.gz rm /tmp/spark-local-* -rf ================================================ FILE: deploy/ec2/template/configure_node.sh ================================================ #!/bin/bash /etc/init.d/ntpd stop ntpdate ntp.ubuntu.com rm -rf /tmp/spark-local* if [ -d "/mnt" ]; then umount /mnt/ rmdir /mnt/ fi; if [ ! -d "/disk1" ]; then mkdir /disk1 mount /dev/xvdb /disk1 -t ext3 fi; mkdir -p /disk1/hdfs/name chown hdfs.hdfs /disk1/hdfs/name mkdir -p /disk1/sparrow mkdir -p /disk1/spark-tmp mkdir -p /disk1/hdfs/data mkdir -p /disk1/tmp/ mkdir -p /disk1/tmp/spark/ chown hdfs.hdfs /disk1/hdfs/data # Annoying ec2 cloud entry in hostfile cat /etc/hosts | grep -v internal > tmp && mv tmp /etc/hosts cp ~/hdfs-site.xml /opt/hadoop/conf/ cp ~/hadoop-env.sh /opt/hadoop/conf/ cp ~/backends.txt /opt/hadoop/conf/slaves cp ~/hive-site.xml /opt/hive/conf/ cp ~/shark-env.sh /root/shark/conf/shark-env.sh cp ~/spark-env.sh /root/spark/conf/spark-env.sh # Create references to per-frontend hive tables cd /opt/tpch_hive/ bash -c "sed -i 's/\/tpch/\/`hostname -i`/g' *.hive" cd - # Reference correct directory in hive queries bash -c "sed -i 's/HOST_IP/`hostname -i`/g' ~/tpch/*" ================================================ FILE: deploy/ec2/template/create_database.sh ================================================ #!/bin/bash # Generate databases SCALE=$1 FRONTENDS=`cat frontends.txt` if [ "$SCALE" = "" ]; then echo "Scale factor required" exit -1 fi if [ -d "/disk1/tpch" ]; then rm -rf /disk1/tpch fi mkdir /disk1/tpch cp /opt/tpch/dbgen/* /disk1/tpch echo "Generating database" cd /disk1/tpch ./dbgen -f -s $SCALE echo "Copying database" sudo -u hdfs /opt/hadoop/bin/hadoop dfs -rmr "hdfs://{{name_node}}:8020/tpch/*" sudo -u hdfs /opt/hadoop/bin/hadoop dfs -rmr "hdfs://{{name_node}}:8020/tpch/" sudo -u hdfs /opt/hadoop/bin/hadoop dfs -mkdir "hdfs://{{name_node}}:8020/tpch/" # Make and populate /tpch/[tbl] directory for each table for t in *.tbl; do name=`echo $t | sed "s/.tbl//g"` sudo -u hdfs /opt/hadoop/bin/hadoop dfs -mkdir "hdfs://{{name_node}}:8020/tpch/$name/" sudo -u hdfs /opt/hadoop/bin/hadoop dfs -Ddfs.block.size=33554432 -copyFromLocal $t hdfs://{{name_node}}:8020/tpch/$name/ done echo "Making Hive User Directory" sudo -u hdfs /opt/hadoop/bin/hadoop dfs -mkdir "hdfs://{{name_node}}:8020/user/" sudo -u hdfs /opt/hadoop/bin/hadoop dfs -mkdir "hdfs://{{name_node}}:8020/user/hive/" echo "Making Temp Dir" sudo -u hdfs /opt/hadoop/bin/hadoop dfs -mkdir "hdfs://{{name_node}}:8020/tmp/" sudo -u hdfs /opt/hadoop/bin/hadoop dfs -chmod -R 777 "hdfs://{{name_node}}:8020/tmp/" echo "Making Hive warehouse dir for denorm table" sudo -u hdfs /opt/hadoop/bin/hadoop dfs -mkdir "hdfs://{{name_node}}:8020/tpch/denorm-warehouse/" ================================================ FILE: deploy/ec2/template/create_tpch_tables_primary.sh ================================================ #!/bin/bash # Create shark tables for tpc-h benchmark LOG=/disk1/sparrow/createTPCH.log SHARK=/root/shark/bin/shark-withinfo QUERY_DIR=/root/tpch cd /disk1/sparrow/ echo "Making base tables" $SHARK -f $QUERY_DIR/make_base_tables.hql > $LOG 2>&1 echo "Making demormalized table" $SHARK -f $QUERY_DIR/make_denorm_table_primary.hql > $LOG 2>&1 ================================================ FILE: deploy/ec2/template/create_tpch_tables_secondary.sh ================================================ #!/bin/bash # Create shark tables for tpc-h benchmark LOG=/disk1/sparrow/createTPCH.log SHARK=/root/shark/bin/shark-withinfo QUERY_DIR=/root/tpch cd /disk1/sparrow/ echo "Making base tables" $SHARK -f $QUERY_DIR/make_base_tables.hql > $LOG 2>&1 echo "Making demormalized table" $SHARK -f $QUERY_DIR/make_denorm_table_secondary.hql > $LOG 2>&1 ================================================ FILE: deploy/ec2/template/deploy_sparrow.sh ================================================ #!/bin/bash # Deploy built version of Sparrow on frontends and backends. FRONTENDS=`cat frontends.txt` BACKENDS=`cat backends.txt` SSH_OPTS="-o StrictHostKeyChecking=no -o ConnectTimeout=5" for fe in $FRONTENDS; do rsync -e "ssh $SSH_OPTS" --delete -az ~/ `dig +short $fe`:~/ & done wait for fe in $FRONTENDS; do ssh $SSH_OPTS `dig +short $fe` "/root/configure_node.sh" & done for be in $BACKENDS; do rsync -e "ssh $SSH_OPTS" --delete -az ~/ `dig +short $be`:~/ & done wait for be in $BACKENDS; do ssh $SSH_OPTS `dig +short $be` "/root/configure_node.sh" & done wait if [ ! -d "/disk1/hdfs/name/current/" ]; then echo "Formatting Namenode" echo "Y" | sudo -u hdfs /opt/hadoop/bin/hadoop namenode -format else echo "Namenode formatted" fi ================================================ FILE: deploy/ec2/template/find_bugs.sh ================================================ #!/bin/bash host=`ec2metadata |grep public-hostname | cut -d " " -f 2` echo $host cat /disk1/sparrow/* |egrep "ERROR|Exception" | wc ================================================ FILE: deploy/ec2/template/find_bugs_filtered.sh ================================================ #!/bin/bash #Filters out some known issues host=`ec2metadata |grep public-hostname | cut -d " " -f 2` echo $host cat /disk1/sparrow/* |egrep "ERROR|Exception" | grep -v ConfigNodeMonitorState | wc ================================================ FILE: deploy/ec2/template/find_bugs_verbose.sh ================================================ #!/bin/bash #Filters out some known issues host=`ec2metadata |grep public-hostname | cut -d " " -f 2` echo $host cat /disk1/sparrow/* |egrep "ERROR|Exception" | grep -v ConfigNodeMonitorState ================================================ FILE: deploy/ec2/template/find_cache_partitions.sh ================================================ #!/bin/bash host=`ec2metadata |grep public-hostname | cut -d " " -f 2` echo $host cat /disk1/sparrow/* |egrep "ensureFree" exit 0 ================================================ FILE: deploy/ec2/template/frontend.conf ================================================ job_arrival_rate_s = {{arrival_lambda}} tasks_per_job = {{tasks_per_job}} benchmark.id = {{benchmark_id}} benchmark.iterations = {{benchmark_iterations}} num_preferred_nodes = {{num_preferred_nodes}} backends = {{backend_comma_joined_list}} warmup_job_arrival_rate_s = {{warmup_job_arrival_rate_s}} warmup_s = {{warmup_s}} post_warmup_s = {{post_warmup_s}} users = {{users}} ================================================ FILE: deploy/ec2/template/frontends.txt ================================================ {{frontend_list}} ================================================ FILE: deploy/ec2/template/hadoop-env.sh ================================================ # The only required environment variable is JAVA_HOME. All others are # optional. When running a distributed configuration it is best to # set JAVA_HOME in this file, so that it is correctly defined on # remote nodes. # The java implementation to use. Required. export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre #export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64 # Extra Java CLASSPATH elements. Optional. export HADOOP_CLASSPATH="/opt/hive/conf/:/opt/hive/build/dist/lib" # The maximum amount of heap to use, in MB. Default is 1000. # export HADOOP_HEAPSIZE=2000 # Extra Java runtime options. Empty by default. # export HADOOP_OPTS=-server # Command specific options appended to HADOOP_OPTS when specified export HADOOP_NAMENODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_NAMENODE_OPTS" export HADOOP_SECONDARYNAMENODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_SECONDARYNAMENODE_OPTS" export HADOOP_DATANODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_DATANODE_OPTS" export HADOOP_BALANCER_OPTS="-Dcom.sun.management.jmxremote $HADOOP_BALANCER_OPTS" export HADOOP_JOBTRACKER_OPTS="-Dcom.sun.management.jmxremote $HADOOP_JOBTRACKER_OPTS" # export HADOOP_TASKTRACKER_OPTS= # The following applies to multiple commands (fs, dfs, fsck, distcp etc) # export HADOOP_CLIENT_OPTS # Extra ssh options. Empty by default. # export HADOOP_SSH_OPTS="-o ConnectTimeout=1 -o SendEnv=HADOOP_CONF_DIR" # Where log files are stored. $HADOOP_HOME/logs by default. # export HADOOP_LOG_DIR=${HADOOP_HOME}/logs # File naming remote slave hosts. $HADOOP_HOME/conf/slaves by default. # export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves # host:path where hadoop code should be rsync'd from. Unset by default. # export HADOOP_MASTER=master:/home/$USER/src/hadoop # Seconds to sleep between slave commands. Unset by default. This # can be useful in large clusters, where, e.g., slave rsyncs can # otherwise arrive faster than the master can service them. # export HADOOP_SLAVE_SLEEP=0.1 # The directory where pid files are stored. /tmp by default. # export HADOOP_PID_DIR=/var/hadoop/pids # A string representing this instance of hadoop. $USER by default. # export HADOOP_IDENT_STRING=$USER # The scheduling priority for daemon processes. See 'man nice'. # export HADOOP_NICENESS=10 ================================================ FILE: deploy/ec2/template/hdfs-site.xml ================================================ dfs.permissions false dfs.name.dir /disk1/hdfs/name dfs.data.dir /disk1/hdfs/data fs.default.name hdfs://{{name_node}}:8020/ dfs.blocksize 33554432 ================================================ FILE: deploy/ec2/template/hive-site.xml ================================================ mapreduce.framework.name foo mapred.job.tracker foo mapred.reduce.tasks -1 The default number of reduce tasks per job. Typically set to a prime close to the number of available hosts. Ignored when mapred.job.tracker is "local". Hadoop set this to 1 by default, whereas hive uses -1 as its default value. By setting this property to -1, Hive will automatically figure out what should be the number of reducers. mapred.max.split.size 256000000 Largest valid size in bytes for a file split. This should be set to a small multiple of the block size in bytes mapred.min.split.size 1 Smallest valid size in bytes for a file split mapred.min.split.size.per.rack 1 The minimum number of bytes of data required to create a rack-local partition mapred.min.split.size.per.node 1 The minimum number of bytes of data required to create a node-local partition hive.exec.reducers.bytes.per.reducer 1000000000 size per reducer.The default is 1G, i.e if the input size is 10G, it will use 10 reducers. hive.exec.reducers.max 999 max number of reducers will be used. If the one specified in the configuration parameter mapred.reduce.tasks is negative, hive will use this one as the max number of reducers when automatically determine number of reducers. hive.cli.print.header false Whether to print the names of the columns in query output. hive.exec.scratchdir /tmp/hive-${user.name} Scratch space for Hive jobs hive.test.mode false whether hive is running in test mode. If yes, it turns on sampling and prefixes the output tablename hive.test.mode.prefix test_ if hive is running in test mode, prefixes the output table by this string hive.test.mode.samplefreq 32 if hive is running in test mode and table is not bucketed, sampling frequency hive.test.mode.nosamplelist if hive is running in test mode, dont sample the above comma seperated list of tables hive.metastore.local true controls whether to connect to remove metastore server or open a new metastore server in Hive Client JVM javax.jdo.option.ConnectionURL jdbc:derby:;databaseName=metastore_db;create=true JDBC connect string for a JDBC metastore javax.jdo.option.ConnectionDriverName org.apache.derby.jdbc.EmbeddedDriver Driver class name for a JDBC metastore javax.jdo.PersistenceManagerFactoryClass org.datanucleus.jdo.JDOPersistenceManagerFactory class implementing the jdo persistence javax.jdo.option.DetachAllOnCommit true detaches all objects from session so that they can be used after transaction is committed javax.jdo.option.NonTransactionalRead true reads outside of transactions javax.jdo.option.ConnectionUserName APP username to use against metastore database javax.jdo.option.ConnectionPassword mine password to use against metastore database datanucleus.connectionPoolingType DBCP Uses a DBCP connection pool for JDBC metastore datanucleus.validateTables false validates existing schema against code. turn this on if you want to verify existing schema datanucleus.validateColumns false validates existing schema against code. turn this on if you want to verify existing schema datanucleus.validateConstraints false validates existing schema against code. turn this on if you want to verify existing schema datanucleus.storeManagerType rdbms metadata store type datanucleus.autoCreateSchema true creates necessary schema on a startup if one doesn't exist. set this to false, after creating it once datanucleus.autoStartMechanismMode checked throw exception if metadata tables are incorrect datanucleus.transactionIsolation read-committed Default transaction isolation level for identity generation. datanucleus.cache.level2 false Use a level 2 cache. Turn this off if metadata is changed independently of hive metastore server datanucleus.cache.level2.type SOFT SOFT=soft reference based cache, WEAK=weak reference based cache. datanucleus.identifierFactory datanucleus Name of the identifier factory to use when generating table/column names etc. 'datanucleus' is used for backward compatibility datanucleus.plugin.pluginRegistryBundleCheck LOG Defines what happens when plugin bundles are found and are duplicated [EXCEPTION|LOG|NONE] hive.metastore.warehouse.dir /tpch/denorm-warehouse location of default database for the warehouse hive.metastore.connect.retries 5 Number of retries while opening a connection to metastore hive.metastore.client.connect.retry.delay 1 Number of seconds for the client to wait between consecutive connection attempts hive.metastore.client.socket.timeout 20 MetaStore Client socket timeout in seconds hive.metastore.rawstore.impl org.apache.hadoop.hive.metastore.ObjectStore 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 hive.default.fileformat TextFile Default file format for CREATE TABLE statement. Options are TextFile and SequenceFile. Users can explicitly say CREATE TABLE ... STORED AS <TEXTFILE|SEQUENCEFILE> to override hive.fileformat.check true Whether to check file format or not when loading data files hive.map.aggr true Whether to use map-side aggregation in Hive Group By queries hive.groupby.skewindata false Whether there is skew in data to optimize group by queries hive.groupby.mapaggr.checkinterval 100000 Number of rows after which size of the grouping keys/aggregation classes is performed hive.mapred.local.mem 0 For local mode, memory of the mappers/reducers hive.mapjoin.followby.map.aggr.hash.percentmemory 0.3 Portion of total memory to be used by map-side grup aggregation hash table, when this group by is followed by map join hive.map.aggr.hash.force.flush.memory.threshold 0.9 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 hive.map.aggr.hash.percentmemory 0.5 Portion of total memory to be used by map-side grup aggregation hash table hive.map.aggr.hash.min.reduction 0.5 Hash aggregation will be turned off if the ratio between hash table size and input rows is bigger than this number. Set to 1 to make sure hash aggregation is never turned off. hive.optimize.cp true Whether to enable column pruner hive.optimize.ppd true Whether to enable predicate pushdown hive.optimize.ppd.storage true Whether to push predicates down into storage handlers. Ignored when hive.optimize.ppd is false. hive.optimize.pruner true Whether to enable the new partition pruner which depends on predicate pushdown. If this is disabled, the old partition pruner which is based on AST will be enabled. hive.optimize.groupby true Whether to enable the bucketed group by from bucketed partitions/tables. hive.join.emit.interval 1000 How many rows in the right-most join operand Hive should buffer before emitting the join result. hive.join.cache.size 25000 How many rows in the joining tables (except the streaming table) should be cached in memory. hive.mapjoin.bucket.cache.size 100 How many values in each keys in the map-joined table should be cached in memory. hive.mapjoin.maxsize 100000 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. hive.mapjoin.cache.numrows 25000 How many rows should be cached by jdbm for map join. hive.optimize.skewjoin false Whether to enable skew join optimization. hive.skewjoin.key 100000 Determine if we get a skew key in join. If we see more than the specified number of rows with the same key in join operator, we think the key as a skew join key. hive.skewjoin.mapjoin.map.tasks 10000 Determine the number of map task used in the follow up map join job for a skew join. It should be used together with hive.skewjoin.mapjoin.min.split to perform a fine grained control. hive.skewjoin.mapjoin.min.split 33554432 Determine the number of map task at most used in the follow up map join job for a skew join by specifying the minimum split size. It should be used together with hive.skewjoin.mapjoin.map.tasks to perform a fine grained control. hive.mapred.mode nonstrict The mode in which the hive operations are being performed. In strict mode, some risky queries are not allowed to run hive.exec.script.maxerrsize 100000 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 hive.exec.script.allow.partial.consumption false When enabled, this option allows a user script to exit successfully without consuming all the data from the standard input. hive.script.operator.id.env.var HIVE_SCRIPT_OPERATOR_ID 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) hive.exec.compress.output false 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* hive.exec.compress.intermediate false 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* hive.exec.parallel false Whether to execute jobs in parallel hive.exec.parallel.thread.number 8 How many jobs at most can be executed in parallel hive.task.progress false 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. hive.hwi.war.file lib/hive-hwi-0.7.1-cdh3u3.war This sets the path to the HWI war file, relative to ${HIVE_HOME}. hive.hwi.listen.host 0.0.0.0 This is the host address the Hive Web Interface will listen on hive.hwi.listen.port 9999 This is the port the Hive Web Interface will listen on hive.exec.pre.hooks 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. hive.exec.post.hooks 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. hive.merge.mapfiles true Merge small files at the end of a map-only job hive.merge.mapredfiles false Merge small files at the end of a map-reduce job hive.mergejob.maponly true Try to generate a map-only job for merging files if CombineHiveInputFormat is supported. hive.heartbeat.interval 1000 Send a heartbeat after this interval - used by mapjoin and filter operators hive.merge.size.per.task 256000000 Size of merged files at the end of the job hive.merge.smallfiles.avgsize 16000000 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. hive.mapjoin.hashtable.initialCapacity 100000 In the process of Mapjoin, the key/value will be hold in the hashtable. This value means the initialCapacity of the in-memory hashtable hive.mapjoin.hashtable.loadfactor 0.75 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 hive.mapjoin.smalltable.filesize 25000000 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 mapred.job.tracker foobar hive.mapjoin.localtask.max.memory.usage 0.90 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. hive.mapjoin.followby.gby.localtask.max.memory.usage 0.55 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. hive.mapjoin.check.memory.rows 100000 The number means after how many rows processed it needs to check the memory usage hive.auto.convert.join false Whether Hive enable the optimization about converting common join into mapjoin based on the input file size hive.script.auto.progress false 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. hive.script.serde org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe The default serde for trasmitting input data to and reading output data from the user scripts. hive.script.recordreader org.apache.hadoop.hive.ql.exec.TextRecordReader The default record reader for reading data from the user scripts. hive.script.recordwriter org.apache.hadoop.hive.ql.exec.TextRecordWriter The default record writer for writing data to the user scripts. hive.input.format org.apache.hadoop.hive.ql.io.CombineHiveInputFormat The default input format. Set this to HiveInputFormat if you encounter problems with CombineHiveInputFormat. hive.udtf.auto.progress false 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. hive.mapred.reduce.tasks.speculative.execution true Whether speculative execution for reducers should be turned on. hive.exec.counters.pull.interval 1000 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. hive.enforce.bucketing false Whether bucketing is enforced. If true, while inserting into the table, bucketing is enforced. hive.enforce.sorting false Whether sorting is enforced. If true, while inserting into the table, sorting is enforced. hive.metastore.ds.connection.url.hook Name of the hook to use for retriving the JDO connection URL. If empty, the value in javax.jdo.option.ConnectionURL is used hive.metastore.ds.retry.attempts 1 The number of times to retry a metastore call if there were a connection error hive.metastore.ds.retry.interval 1000 The number of miliseconds between metastore retry attempts hive.metastore.server.min.threads 200 Minimum number of worker threads in the Thrift server's pool. hive.metastore.server.max.threads 100000 Maximum number of worker threads in the Thrift server's pool. hive.metastore.server.tcp.keepalive true Whether to enable TCP keepalive for the metastore server. Keepalive will prevent accumulation of half-open connections. hive.metastore.sasl.enabled false If true, the metastore thrift interface will be secured with SASL. Clients must authenticate with Kerberos. hive.metastore.kerberos.keytab.file The path to the Kerberos Keytab file containing the metastore thrift server's service principal. hive.metastore.kerberos.principal hive-metastore/_HOST@EXAMPLE.COM The service principal for the metastore thrift server. The special string _HOST will be replaced automatically with the correct host name. hive.metastore.cache.pinobjtypes Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order List of comma separated metastore object types that should be pinned in the cache hive.optimize.reducededuplication true 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. hive.exec.dynamic.partition false Whether or not to allow dynamic partitions in DML/DDL. hive.exec.dynamic.partition.mode strict In strict mode, the user must specify at least one static partition in case the user accidentally overwrites all partitions. hive.exec.max.dynamic.partitions 1000 Maximum number of dynamic partitions allowed to be created in total. hive.exec.max.dynamic.partitions.pernode 100 Maximum number of dynamic partitions allowed to be created in each mapper/reducer node. hive.exec.max.created.files 100000 Maximum number of HDFS files created by all mappers/reducers in a MapReduce job. hive.exec.default.partition.name __HIVE_DEFAULT_PARTITION__ 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. hive.stats.dbclass jdbc:derby The default database that stores temporary hive statistics. hive.stats.autogather true A flag to gather statistics automatically during the INSERT OVERWRITE command. hive.stats.jdbcdriver org.apache.derby.jdbc.EmbeddedDriver The JDBC driver for the database that stores temporary hive statistics. hive.stats.dbconnectionstring jdbc:derby:;databaseName=TempStatsStore;create=true The default connection string for the database that stores temporary hive statistics. hive.stats.default.publisher The Java class (implementing the StatsPublisher interface) that is used by default if hive.stats.dbclass is not JDBC or HBase. hive.stats.default.aggregator The Java class (implementing the StatsAggregator interface) that is used by default if hive.stats.dbclass is not JDBC or HBase. hive.stats.jdbc.timeout 30 Timeout value (number of seconds) used by JDBC connection and statements. hive.stats.jdbc.atomic false 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. hive.support.concurrency false 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. hive.concurrency.manager org.apache.hadoop.hive.ql.lockmgr.ZooKeeperLockMgr The concurrency manager for hive. hive.lock.numretries 100 The number of times you want to try to get all the locks hive.lock.sleep.between.retries 60 The sleep time (in seconds) between various retries hive.zookeeper.quorum The list of zookeeper servers to talk to. This is only needed for read/write locks. hive.zookeeper.client.port 2181 The port of zookeeper servers to talk to. This is only needed for read/write locks. hive.zookeeper.session.timeout 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. hive.zookeeper.namespace hive_zookeeper_namespace The parent node under which all zookeeper nodes are created. hive.zookeeper.clean.extra.nodes false Clean extra nodes at the end of the session. fs.har.impl org.apache.hadoop.hive.shims.HiveHarFileSystem The implementation for accessing Hadoop Archives. Note that this won't be applicable to Hadoop vers less than 0.20 hive.archive.enabled false Whether archiving operations are permitted hive.archive.har.parentdir.settable false In new Hadoop versions, the parent directory must be set while creating a HAR. Because this functionality is hard to detect with just version numbers, this conf var needs to be set manually. hive.fetch.output.serde org.apache.hadoop.hive.serde2.DelimitedJSONSerDe The serde used by FetchTask to serialize the fetch output. hive.exec.mode.local.auto false Let hive determine whether to run in local mode automatically hive.exec.drop.ignorenonexistent true Do not report an error if DROP TABLE/VIEW specifies a non-existent table/view hive.exec.show.job.failure.debug.info false If a job fails, whether to provide a link in the CLI to the task with the most failures, along with debugging hints if applicable. hive.auto.progress.timeout 0 How long to run autoprogressor for the script/UDTF operators (in seconds). Set to 0 for forever. hive.hbase.wal.enabled true 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. hive.table.parameters.default Default property values for newly created tables hive.variable.substitute true This enables substitution using syntax like ${var} ${system:var} and ${env:var}. hive.security.authorization.enabled false enable or disable the hive client authorization hive.security.authorization.manager org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider the hive client authorization manager class name. The user defined authorization class should implement interface org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider. hive.security.authenticator.manager org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator hive client authenticator manager class name. The user defined authenticator should implement interface org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider. hive.security.authorization.createtable.user.grants the privileges automatically granted to some users whenever a table gets created. An example like "userX,userY:select;userZ:create" will grant select privilege to userX and userY, and grant create privilege to userZ whenever a new table created. hive.security.authorization.createtable.group.grants the privileges automatically granted to some groups whenever a table gets created. An example like "groupX,groupY:select;groupZ:create" will grant select privilege to groupX and groupY, and grant create privilege to groupZ whenever a new table created. hive.security.authorization.createtable.role.grants the privileges automatically granted to some roles whenever a table gets created. An example like "roleX,roleY:select;roleZ:create" will grant select privilege to roleX and roleY, and grant create privilege to roleZ whenever a new table created. hive.security.authorization.createtable.owner.grants the privileges automatically granted to the owner whenever a table gets created. An example like "select,drop" will grant select and drop privilege to the owner of the table hive.error.on.empty.partition false Whether to throw an excpetion if dynamic partition insert generates empty results. hive.index.compact.file.ignore.hdfs false True the hdfs location stored in the index file will be igbored at runtime. If the data got moved or the name of the cluster got changed, the index data should still be usable. hive.rework.mapredwork false should rework the mapred work or not. This is first introduced by SymlinkTextInputFormat to replace symlink files with real paths at compile time. hive.output.file.extension 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. fs.default.name hdfs://{{name_node}}:8020/ ================================================ FILE: deploy/ec2/template/prepare_logs.sh ================================================ #!/bin/bash cp /disk1/sparrow/shark_* /root/ touch foo.log && gzip -f *.log ================================================ FILE: deploy/ec2/template/shark-env.sh ================================================ #!/usr/bin/env bash # Copyright (C) 2012 The Regents of The University California. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # (Required) Amount of memory used per slave node. This should be in the same # format as the JVM's -Xmx option, e.g. 300m or 1g. export SPARK_MEM=15g # (Required) Set the master program's memory export SHARK_MASTER_MEM=1g # (Required) Point to your Scala installation. export SCALA_HOME="/opt/scala-2.9.3" export SCALA_VERSON=2.9.3 # Use this for non-HVM amis: export JAVA_HOME="/usr/lib/jvm/java-6-sun/jre" # Use this for HVM amis: #export JAVA_HOME="/usr/lib/jvm/jre-1.6.0-openjdk.x86_64" # (Required) Point to the patched Hive binary distribution export HIVE_DEV_HOME="/opt/hive" export HIVE_HOME="$HIVE_DEV_HOME/build/dist" # (Optional) Specify the location of Hive's configuration directory. By default, # it points to $HIVE_HOME/conf export HIVE_CONF_DIR="$HIVE_DEV_HOME/conf" # For running Shark in distributed mode, set the following: export HADOOP_HOME="/opt/hadoop/" export SPARK_HOME="/disk1/tmp/spark/" my_ip=`hostname -i` before_me=`cat /root/sparrow_schedulers.txt | grep -B 1000 $my_ip | grep -v $my_ip | tr "\n" ","` after_me=`cat /root/sparrow_schedulers.txt | grep -A 1000 $my_ip | grep -v $my_ip | tr "\n" ","` export MASTER="sparrow@$my_ip:20503," # Temp fix: need to add this back to the master thing for fault tolerance $before_me$after_me" # Only required if using Mesos: #export MESOS_NATIVE_LIBRARY=/usr/local/lib/libmesos.so # (Optional) Extra classpath #export SPARK_LIBRARY_PATH="" # Java options # On EC2, change the local.dir to /mnt/tmp SPARK_JAVA_OPTS="-Dspark.local.dir=/tmp " SPARK_JAVA_OPTS+="-Dspark.serializer=spark.KryoSerializer -Dspark.kryoserializer.buffer.mb=10 " SPARK_JAVA_OPTS+="-verbose:gc -XX:-PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseConcMarkSweepGC" SPARK_JAVA_OPTS+=" -Dsparrow.app.name=spark_`hostname -i`" # Spark options that are usually sent to the executor using environment variables packaged # from the Spark master, but that we need to set manually when running with Sparrow. SPARK_JAVA_OPTS+=" -Dspark.broadcast.port=33624 -Dspark.driver.port=60500" SPARK_JAVA_OPTS+=" -Dspark.io.compression.codec=spark.io.LZFCompressionCodec" export SPARK_JAVA_OPTS ================================================ FILE: deploy/ec2/template/spark-env.sh ================================================ #!/usr/bin/env bash # Set Spark environment variables for your site in this file. Some useful # variables to set are: # - MESOS_HOME, to point to your Mesos installation # - SCALA_HOME, to point to your Scala installation SCALA_HOME=/opt/scala-2.9.3 SPARK_CLASSPATH="/root/spark/core/lib/sparrow-1.0-SNAPSHOT.jar" # Add Shark jars SHARK_HOME="/root/shark" SPARK_CLASSPATH+=:$SHARK_HOME/target/scala-$SCALA_VERSION/classes for jar in `find $SHARK_HOME/lib -name '*jar'`; do SPARK_CLASSPATH+=:$jar done for jar in `find $SHARK_HOME/lib_managed/jars -name '*jar'`; do SPARK_CLASSPATH+=:$jar done for jar in `find $SHARK_HOME/lib_managed/bundles -name '*jar'`; do SPARK_CLASSPATH+=:$jar done # Add Hive jars. export HIVE_HOME="/opt/hive/build/dist" for jar in `find $HIVE_HOME/lib -name '*jar'`; do # Ignore the logging library since it has already been included with the Spark jar. if [[ "$jar" != *slf4j* ]]; then SPARK_CLASSPATH+=:$jar fi done # Add location of Hive configuration file. SPARK_CLASSPATH+=:/opt/hive/conf/ SPARK_JAVA_OPTS="-Dspark.io.compression.codec=spark.io.LZFCompressionCodec -Dspark.local.dir=/disk1/spark-tmp" # - SPARK_MEM, to change the amount of memory used per node (this should # be in the same format as the JVM's -Xmx option, e.g. 300m or 1g). # - SPARK_LIBRARY_PATH, to add extra search paths for native libraries. ================================================ FILE: deploy/ec2/template/spark-run.sh ================================================ #!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # SCALA_VERSION=2.9.3 # Figure out where the Scala framework is installed FWDIR="$(cd `dirname $0`; pwd)" # Export this as SPARK_HOME export SPARK_HOME="$FWDIR" # Load environment variables from conf/spark-env.sh, if it exists if [ -e $FWDIR/conf/spark-env.sh ] ; then . $FWDIR/conf/spark-env.sh fi if [ -z "$1" ]; then echo "Usage: run []" >&2 exit 1 fi # If this is a standalone cluster daemon, reset SPARK_JAVA_OPTS and SPARK_MEM to reasonable # values for that; it doesn't need a lot if [ "$1" = "spark.deploy.master.Master" -o "$1" = "spark.deploy.worker.Worker" ]; then SPARK_MEM=${SPARK_DAEMON_MEMORY:-512m} SPARK_DAEMON_JAVA_OPTS="$SPARK_DAEMON_JAVA_OPTS -Dspark.akka.logLifecycleEvents=true" # Do not overwrite SPARK_JAVA_OPTS environment variable in this script OUR_JAVA_OPTS="$SPARK_DAEMON_JAVA_OPTS" # Empty by default else OUR_JAVA_OPTS="$SPARK_JAVA_OPTS" fi # Add java opts for master, worker, executor. The opts maybe null case "$1" in 'spark.deploy.master.Master') OUR_JAVA_OPTS="$OUR_JAVA_OPTS $SPARK_MASTER_OPTS" ;; 'spark.deploy.worker.Worker') OUR_JAVA_OPTS="$OUR_JAVA_OPTS $SPARK_WORKER_OPTS" ;; 'spark.executor.StandaloneExecutorBackend') OUR_JAVA_OPTS="$OUR_JAVA_OPTS $SPARK_EXECUTOR_OPTS" ;; 'spark.executor.MesosExecutorBackend') OUR_JAVA_OPTS="$OUR_JAVA_OPTS $SPARK_EXECUTOR_OPTS" ;; 'spark.repl.Main') OUR_JAVA_OPTS="$OUR_JAVA_OPTS $SPARK_REPL_OPTS" ;; esac # Figure out whether to run our class with java or with the scala launcher. # In most cases, we'd prefer to execute our process with java because scala # creates a shell script as the parent of its Java process, which makes it # hard to kill the child with stuff like Process.destroy(). However, for # the Spark shell, the wrapper is necessary to properly reset the terminal # when we exit, so we allow it to set a variable to launch with scala. # We still fall back on java for the shell if this is a "release" created # from make-distribution.sh since it's possible scala is not installed # but we have everything we need to run the shell. if [[ "$SPARK_LAUNCH_WITH_SCALA" == "1" && ! -f "$FWDIR/RELEASE" ]]; then if [ "$SCALA_HOME" ]; then RUNNER="${SCALA_HOME}/bin/scala" else if [ `command -v scala` ]; then RUNNER="scala" else echo "SCALA_HOME is not set and scala is not in PATH" >&2 exit 1 fi fi else if [ -n "${JAVA_HOME}" ]; then RUNNER="${JAVA_HOME}/bin/java" else if [ `command -v java` ]; then RUNNER="java" else echo "JAVA_HOME is not set" >&2 exit 1 fi fi if [[ ! -f "$FWDIR/RELEASE" && -z "$SCALA_LIBRARY_PATH" ]]; then if [ -z "$SCALA_HOME" ]; then echo "SCALA_HOME is not set" >&2 exit 1 fi SCALA_LIBRARY_PATH="$SCALA_HOME/lib" fi fi # Figure out how much memory to use per executor and set it as an environment # variable so that our process sees it and can report it to Mesos if [ -z "$SPARK_MEM" ] ; then SPARK_MEM="512m" fi export SPARK_MEM # Set JAVA_OPTS to be able to load native libraries and to set heap size JAVA_OPTS="$OUR_JAVA_OPTS" JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$SPARK_LIBRARY_PATH" JAVA_OPTS="$JAVA_OPTS -Xms$SPARK_MEM -Xmx$SPARK_MEM" # Load extra JAVA_OPTS from conf/java-opts, if it exists if [ -e $FWDIR/conf/java-opts ] ; then JAVA_OPTS="$JAVA_OPTS `cat $FWDIR/conf/java-opts`" fi export JAVA_OPTS # Attention: when changing the way the JAVA_OPTS are assembled, the change must be reflected in ExecutorRunner.scala! if [ ! -f "$FWDIR/RELEASE" ]; then CORE_DIR="$FWDIR/core" EXAMPLES_DIR="$FWDIR/examples" REPL_DIR="$FWDIR/repl" # Exit if the user hasn't compiled Spark if [ ! -e "$CORE_DIR/target" ]; then echo "Failed to find Spark classes in $CORE_DIR/target" >&2 echo "You need to compile Spark before running this program" >&2 exit 1 fi if [[ "$@" = *repl* && ! -e "$REPL_DIR/target" ]]; then echo "Failed to find Spark classes in $REPL_DIR/target" >&2 echo "You need to compile Spark repl module before running this program" >&2 exit 1 fi # Figure out the JAR file that our examples were packaged into. This includes a bit of a hack # to avoid the -sources and -doc packages that are built by publish-local. if [ -e "$EXAMPLES_DIR/target/scala-$SCALA_VERSION/spark-examples"*[0-9T].jar ]; then # Use the JAR from the SBT build export SPARK_EXAMPLES_JAR=`ls "$EXAMPLES_DIR/target/scala-$SCALA_VERSION/spark-examples"*[0-9T].jar` fi if [ -e "$EXAMPLES_DIR/target/spark-examples"*[0-9T].jar ]; then # Use the JAR from the Maven build export SPARK_EXAMPLES_JAR=`ls "$EXAMPLES_DIR/target/spark-examples"*[0-9T].jar` fi fi # Compute classpath using external script CLASSPATH=`$FWDIR/bin/compute-classpath.sh` export CLASSPATH if [ "$SPARK_LAUNCH_WITH_SCALA" == "1" ]; then EXTRA_ARGS="" # Java options will be passed to scala as JAVA_OPTS else # The JVM doesn't read JAVA_OPTS by default so we need to pass it in EXTRA_ARGS="$JAVA_OPTS" fi command="$RUNNER -cp \"$CLASSPATH\" $EXTRA_ARGS $@" if [ "$SPARK_PRINT_LAUNCH_COMMAND" == "1" ]; then echo "Spark Command: $command" echo "========================================" echo fi exec "$RUNNER" -cp "$CLASSPATH" $EXTRA_ARGS "$@" ================================================ FILE: deploy/ec2/template/sparrow.conf ================================================ deployment.mode = configbased static.node_monitors = {{static_backends}} system.cpus = {{cpus}} static.app.name = spark scheduler.thrift.threads = 200 log_level = DEBUG agent.thrift.threads = 200 internal_agent.thrift.threads = 200 sample.ratio = {{sample_ratio}} sample.ratio.constrained = {{sample_ratio_constrained}} node_monitor.task_scheduler = {{node_monitor_task_scheduler}} cancellation = True spread_evenly_task_set_size={{num_partitions}} per_task = True ================================================ FILE: deploy/ec2/template/sparrow_schedulers.txt ================================================ {{sparrow_schedulers}} ================================================ FILE: deploy/ec2/template/start_mesos_master.sh ================================================ #!/bin/bash # Start mesos master # Make sure software firewall is stopped (ec2 firewall subsumes) /etc/init.d/iptables stop > /dev/null 2>&1 APPCHK=$(ps aux | grep -v grep | grep -c mesos-master) if [ ! $APPCHK = '0' ]; then echo "Mesos master already running, cannot start it." exit 1; fi LOG=/disk1/sparrow/mesosMaster.log nohup /opt/mesos/bin/mesos-master > $LOG 2>&1 & PID=$! echo "Logging to $LOG" sleep 1 if ! kill -0 $PID > /dev/null 2>&1; then echo "Mesos masger failed to start" exit 1; else echo "Mesos master started with pid $PID" exit 0; fi ================================================ FILE: deploy/ec2/template/start_mesos_slave.sh ================================================ #!/bin/bash # Start mesos slave # Make sure software firewall is stopped (ec2 firewall subsumes) /etc/init.d/iptables stop > /dev/null 2>&1 APPCHK=$(ps aux | grep -v grep | grep -c mesos-slave) export MESOS_HOME="/opt/mesos" CPUS=`grep processor /proc/cpuinfo | wc -l` #CPUS=8 MEM_KB=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'` MEM=$[(MEM_KB - 1024 * 1024) / 1024] # Leaves 1 GB free RES_OPTS="--resources=cpus:$CPUS;mem:$MEM" if [ ! $APPCHK = '0' ]; then echo "Mesos slave already running, cannot start it." exit 1; fi MASTER=`cat frontends.txt | head -n 1` LOG=/disk1/sparrow/mesosSlave.log HOSTNAME=`ec2metadata | grep local-hostname | cut -d " " -f 2` export SPARK_HOSTNAME=$HOSTNAME nohup /opt/mesos/bin/mesos-slave $RES_OPTS --master=mesos://master@$MASTER:5050> $LOG 2>&1 & PID=$! echo "Logging to $LOG" sleep 1 if ! kill -0 $PID > /dev/null 2>&1; then echo "Mesos slave failed to start" exit 1; else echo "Mesos slave started with pid $PID" exit 0; fi ================================================ FILE: deploy/ec2/template/start_proto_backend.sh ================================================ #!/bin/bash # Start Prototype backend LOG=/disk1/sparrow/protoBackend APPCHK=$(ps aux | grep -v grep | grep -c ProtoBackend) if [ ! $APPCHK = '0' ]; then echo "Backend already running, cannot start it." exit 1; fi nohup java -cp ./sparrow/sparrow-1.0-SNAPSHOT.jar edu.berkeley.sparrow.examples.ProtoBackend > $LOG 2>&1 & PID=$! echo "Logging to $LOG" sleep 1 if ! kill -0 $PID > /dev/null 2>&1; then echo "Proto backend failed to start" exit 1; else echo "Proto backend started with pid $PID" exit 0; fi ================================================ FILE: deploy/ec2/template/start_proto_frontend.sh ================================================ #!/bin/bash # Start Prototype frontend LOG=/disk1/sparrow/protoFrontend.log APPCHK=$(ps aux | grep -v grep | grep -c {{frontend_type}}) if [ ! $APPCHK = '0' ]; then echo "Frontend already running, cannot start it." exit 1; fi nohup 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 & PID=$! echo "Logging to $LOG" sleep 1 if ! kill -0 $PID > /dev/null 2>&1; then echo "Proto frontend failed to start" exit 1; else echo "Proto frontend started with pid $PID" exit 0; fi ================================================ FILE: deploy/ec2/template/start_shark_tpch.sh ================================================ #!/bin/bash # Start shark tpch workload ulimit -n 16384 APPCHK=$(ps aux | grep -v grep |grep -v start| grep java | grep -c spark) ip=`ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'` log="/disk1/sparrow/shark_$ip.log" public_hostname=`ec2metadata | grep public-hostname | cut -d " " -f 2` fe_num=`cat frontends.txt | grep -n $public_hostname | cut -d ":" -f 1` cd /disk1/sparrow/ sleep .0$[ ( $RANDOM % 10 ) + 1 ]s # Helps avoid synchronization /root/shark/run shark.sparrow.SparrowTPCHRunner /root/tpch/tpch_workload_$fe_num {{inter_query_delay}} > $log 2>&1 & PID=$! echo "Logging to $log" sleep 1 if ! kill -0 $PID > /dev/null 2>&1; then echo "Shark TPCH failed to start" exit 1; else echo "Shark TPCH started with pid $PID" exit 0; fi ================================================ FILE: deploy/ec2/template/start_spark_backend.sh ================================================ #!/bin/bash # Start Spark backend ulimit -n 16384 FRONTENDS=`cat frontends.txt` APPCHK=$(ps aux | grep -v grep | grep spark |grep -c java) if [ ! $APPCHK = '0' ]; then echo "Spark already running, cannot start it." exit 1; fi port=8300 for fe in $FRONTENDS; do ip=`dig +short $fe` id=spark_$ip log=/disk1/sparrow/$id chmod 755 spark-run.sh HOSTNAME=`ec2metadata | grep local-hostname | cut -d " " -f 2` export SPARK_HOSTNAME=$HOSTNAME export SPARK_MEM={{spark_backend_mem}} name=`host $ip | cut -d " " -f 5 | cut -d "." -f 1-3` /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 & ((port++)) PID=$! echo "Logging to $log" sleep .5 if ! kill -0 $PID > /dev/null 2>&1; then echo "Spark executor failed to start" exit 1; else echo "Spark executor started with pid $PID" fi done ================================================ FILE: deploy/ec2/template/start_spark_frontend.sh ================================================ #!/bin/bash # Start Prototype frontend ulimit -n 16384 APPCHK=$(ps aux | grep -v grep |grep -v start| grep java | grep -c spark) SCHED=$1 RATE=$2 MAX=$3 QNUM=$4 PAR_LEVEL=$5 MESOS_MASTER=`cat frontends.txt | head -n 1` /etc/init.d/iptables stop > /dev/null 2>&1 if [ "$SCHED" = "" ]; then echo "Scheduler required" exit -1 fi if [ ! $APPCHK = '0' ]; then echo "Frontend already running, cannot start it." exit 1; fi ip=`ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'` log="/disk1/sparrow/spark_$ip.log" chmod 755 spark-run.sh HOSTNAME=`ec2metadata | grep local-hostname | cut -d " " -f 2` if [ "$SCHED" = "sparrow" ]; then export SPARK_HOSTNAME=$HOSTNAME 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 & else SPARK_MEM="1300m" export SPARK_MEM 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 & fi PID=$! echo "Logging to $log" sleep 1 if ! kill -0 $PID > /dev/null 2>&1; then echo "Proto frontend failed to start" exit 1; else echo "Proto frontend started with pid $PID" exit 0; fi ================================================ FILE: deploy/ec2/template/start_sparrow.sh ================================================ #!/bin/bash # Start Sparrow locally ulimit -n 16384 LOG=/disk1/sparrow/sparrowDaemon.log IP=`ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'` ip_there=`cat sparrow.conf |grep hostname` if [ "X$ip_there" == "X" ]; then echo "hostname = $IP" >> sparrow.conf fi # Make sure software firewall is stopped (ec2 firewall subsumes) /etc/init.d/iptables stop > /dev/null 2>&1 APPCHK=$(ps aux | grep -v grep | grep -c SparrowDaemon) if [ ! $APPCHK = '0' ]; then echo "Sparrow already running, cannot start it." exit 1; fi # -XX:MaxGCPauseMillis=3 # removed nice -n -20 nohup 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 & PID=$! echo "Logging to $LOG" sleep 1 if ! kill -0 $PID > /dev/null 2>&1; then echo "Sparrow Daemon failed to start" exit 1; else echo "Sparrow Daemon started with pid $PID" exit 0; fi ================================================ FILE: deploy/ec2/template/start_throughput_exp_spark.sh ================================================ #!/bin/bash # Starts an experiment to test scheduler throughput with spark. # Starts the master and slaves, and then the throughpupt # tester. my_ip=`hostname -i` log="/disk1/sparrow/spark_throughput_$my_ip.log" # Spark needs the list of backends in order to start them all. cp ~/backends.txt /root/spark/conf/slaves /root/spark/bin/start-all.sh # Give the master and workers a moment to get started. echo "Done starting master and workers; sleeping before starting tester" sleep 5s echo "Starting throughput tester" /root/spark/run spark.scheduler.sparrow.ThroughputTester "spark://`hostname`:7077" {{total_cores}} 60000 10000,1000,500,100 > $log 2>&1 & ================================================ FILE: deploy/ec2/template/start_throughput_exp_sparrow.sh ================================================ #!/bin/bash # Starts an experiment to test scheduler throughput. my_ip=`hostname -i` log="/disk1/sparrow/spark_$my_ip.log" # for sparrow master: "sparrow@$my_ip:20503 /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 & ================================================ FILE: deploy/ec2/template/stop_mesos_master.sh ================================================ #!/bin/bash # Stop mesos master APPCHK=$(ps aux | grep -v grep | grep -c mesos-master) if [ $APPCHK = '0' ]; then echo "Mesos master is not running. Doing nothing." exit 0; fi ps -ef |grep mesos-master| grep -v grep | awk '{ print $2; }' | xargs -I {} kill -9 {} echo "Stopped mesos master process." exit 0; ================================================ FILE: deploy/ec2/template/stop_mesos_slave.sh ================================================ #!/bin/bash # Stop mesos slave APPCHK=$(ps aux | grep -v grep | grep -c mesos-slave) if [ $APPCHK = '0' ]; then echo "Mesos slave is not running. Doing nothing." exit 0; fi ps -ef |grep mesos-slave| grep -v grep | awk '{ print $2; }' | xargs -I {} kill -9 {} echo "Stopped mesos slave process." exit 0; ================================================ FILE: deploy/ec2/template/stop_proto_backend.sh ================================================ #!/bin/bash # Stop proto backend locally APPCHK=$(ps aux | grep -v grep | grep -c ProtoBackend) if [ $APPCHK = '0' ]; then echo "ProtoBackend is not running. Doing nothing." exit 0; fi ps -ef |grep ProtoBackend |grep -v grep | awk '{ print $2; }' | xargs -I {} kill -9 {} echo "Stopped ProtoBackend process" exit 0; ================================================ FILE: deploy/ec2/template/stop_proto_frontend.sh ================================================ #!/bin/bash # Stop proto frontend locally APPCHK=$(ps aux | grep -v grep | grep -c {{frontend_type}}) if [ $APPCHK = '0' ]; then echo "{{frontend_type}} is not running. Doing nothing." exit 0; fi ps -ef |grep {{frontend_type}} |grep -v grep | awk '{ print $2; }' | xargs -I {} kill -9 {} echo "Stopped {{frontend_type}} process" exit 0; ================================================ FILE: deploy/ec2/template/stop_spark_backend.sh ================================================ #!/bin/bash # Stop spark backend locally APPCHK=$(ps aux | grep -v grep | grep -v stop | grep -c spark) if [ $APPCHK = '0' ]; then echo "Spark is not running. Doing nothing." exit 0; fi ps -ef |grep spark |grep -v grep | grep -v stop | awk '{ print $2; }' | xargs -I {} kill -9 {} echo "Stopped spark process" exit 0; ================================================ FILE: deploy/ec2/template/stop_spark_frontend.sh ================================================ #!/bin/bash # Stop spark frontend locally APPCHK=$(ps aux | grep -v grep | grep -v stop | grep -c spark) if [ $APPCHK = '0' ]; then echo "Spark is not running. Doing nothing." exit 0; fi ps -ef |grep spark | grep -v stop | grep -v grep | awk '{ print $2; }' | xargs -I {} kill -9 {} echo "Stopped spark process" exit 0; ================================================ FILE: deploy/ec2/template/stop_sparrow.sh ================================================ #!/bin/bash # Stop sparrow locally APPCHK=$(ps aux | grep -v grep | grep -c SparrowDaemon) if [ $APPCHK = '0' ]; then echo "Sparrow is not running. Doing nothing." exit 0; fi ps -ef |grep SparrowDaemon |grep -v grep | awk '{ print $2; }' | xargs -I {} kill -9 {} echo "Stopped Sparrow process" exit 0; ================================================ FILE: deploy/ec2/template/tpch/make_base_tables.hql ================================================ drop table if exists lineitem; drop table if exists orders; drop table if exists denorm; drop table if exists part; drop table if exists supplier; drop table if exists nation; drop table if exists partsupp; drop table if exists customer; drop table if exists region; create external table region (R_REGIONKEY INT, R_NAME STRING, R_COMMENT STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE LOCATION '/tpch/region'; Create 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'; create 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'; create 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'; create 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'; create 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'; create 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'; create 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'; ================================================ FILE: deploy/ec2/template/tpch/make_denorm_cached.hql ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; create table denorm_cached as select 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 from denorm group 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; set hive.map.aggr=true; ================================================ FILE: deploy/ec2/template/tpch/make_denorm_table_primary.hql ================================================ SET mapred.reduce.tasks={{reduce_tasks}}; drop table if exists denorm; create table denorm row format delimited fields terminated by '|' STORED AS TEXTFILE AS select 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 from (select * from (select * from (select * from (select * from (select * from (select r_regionkey, r_name, n_nationkey, n_name from region r join nation n on n.n_regionkey = r.r_regionkey) nr join supplier s on s.s_nationkey = nr.n_nationkey) nrs join partsupp ps on nrs.s_suppkey = ps.ps_suppkey) nrsps join part p on p.p_partkey = nrsps.ps_partkey) nrspsp join lineitem l on l.l_partkey = nrspsp.ps_partkey and l.l_suppkey = nrspsp.ps_suppkey) nrspspl join orders o on o.o_orderkey = nrspspl.l_orderkey) nrspsplo join customer c on c.c_custkey = nrspsplo.o_custkey; ================================================ FILE: deploy/ec2/template/tpch/make_denorm_table_secondary.hql ================================================ 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/'; ================================================ FILE: deploy/ec2/template/tpch/tpch_workload_1 ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; drop table if exists denorm_cached; create table denorm_cached as select --SPREAD_EVENLY-- 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 from denorm group 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; set hive.map.aggr=true; select --SPREAD_EVENLY-- count(*) from denorm_cached; select --SPREAD_EVENLY-- count(*) from denorm_cached; set mapred.reduce.tasks={{reduce_tasks}}; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; ================================================ FILE: deploy/ec2/template/tpch/tpch_workload_10 ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; drop table if exists denorm_cached; create table denorm_cached as select --SPREAD_EVENLY-- 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 from denorm group 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; set hive.map.aggr=true; select --SPREAD_EVENLY-- count(*) from denorm_cached; select --SPREAD_EVENLY-- count(*) from denorm_cached; set mapred.reduce.tasks={{reduce_tasks}}; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; ================================================ FILE: deploy/ec2/template/tpch/tpch_workload_11 ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; drop table if exists denorm_cached; create table denorm_cached as select --SPREAD_EVENLY-- 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 from denorm group 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; set hive.map.aggr=true; select --SPREAD_EVENLY-- count(*) from denorm_cached; select --SPREAD_EVENLY-- count(*) from denorm_cached; set mapred.reduce.tasks={{reduce_tasks}}; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; ================================================ FILE: deploy/ec2/template/tpch/tpch_workload_12 ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; drop table if exists denorm_cached; create table denorm_cached as select --SPREAD_EVENLY-- 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 from denorm group 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; set hive.map.aggr=true; select --SPREAD_EVENLY-- count(*) from denorm_cached; select --SPREAD_EVENLY-- count(*) from denorm_cached; set mapred.reduce.tasks={{reduce_tasks}}; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; ================================================ FILE: deploy/ec2/template/tpch/tpch_workload_13 ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; drop table if exists denorm_cached; create table denorm_cached as select --SPREAD_EVENLY-- 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 from denorm group 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; set hive.map.aggr=true; select --SPREAD_EVENLY-- count(*) from denorm_cached; select --SPREAD_EVENLY-- count(*) from denorm_cached; set mapred.reduce.tasks={{reduce_tasks}}; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; ================================================ FILE: deploy/ec2/template/tpch/tpch_workload_14 ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; drop table if exists denorm_cached; create table denorm_cached as select --SPREAD_EVENLY-- 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 from denorm group 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; set hive.map.aggr=true; select --SPREAD_EVENLY-- count(*) from denorm_cached; select --SPREAD_EVENLY-- count(*) from denorm_cached; set mapred.reduce.tasks={{reduce_tasks}}; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; ================================================ FILE: deploy/ec2/template/tpch/tpch_workload_15 ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; drop table if exists denorm_cached; create table denorm_cached as select --SPREAD_EVENLY-- 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 from denorm group 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; set hive.map.aggr=true; select --SPREAD_EVENLY-- count(*) from denorm_cached; select --SPREAD_EVENLY-- count(*) from denorm_cached; set mapred.reduce.tasks={{reduce_tasks}}; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; ================================================ FILE: deploy/ec2/template/tpch/tpch_workload_2 ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; drop table if exists denorm_cached; create table denorm_cached as select --SPREAD_EVENLY-- 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 from denorm group 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; set hive.map.aggr=true; select --SPREAD_EVENLY-- count(*) from denorm_cached; select --SPREAD_EVENLY-- count(*) from denorm_cached; set mapred.reduce.tasks={{reduce_tasks}}; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; ================================================ FILE: deploy/ec2/template/tpch/tpch_workload_3 ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; drop table if exists denorm_cached; create table denorm_cached as select --SPREAD_EVENLY-- 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 from denorm group 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; set hive.map.aggr=true; select --SPREAD_EVENLY-- count(*) from denorm_cached; select --SPREAD_EVENLY-- count(*) from denorm_cached; set mapred.reduce.tasks={{reduce_tasks}}; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; ================================================ FILE: deploy/ec2/template/tpch/tpch_workload_4 ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; drop table if exists denorm_cached; create table denorm_cached as select --SPREAD_EVENLY-- 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 from denorm group 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; set hive.map.aggr=true; select --SPREAD_EVENLY-- count(*) from denorm_cached; select --SPREAD_EVENLY-- count(*) from denorm_cached; set mapred.reduce.tasks={{reduce_tasks}}; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; ================================================ FILE: deploy/ec2/template/tpch/tpch_workload_5 ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; drop table if exists denorm_cached; create table denorm_cached as select --SPREAD_EVENLY-- 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 from denorm group 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; set hive.map.aggr=true; select --SPREAD_EVENLY-- count(*) from denorm_cached; select --SPREAD_EVENLY-- count(*) from denorm_cached; set mapred.reduce.tasks={{reduce_tasks}}; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; ================================================ FILE: deploy/ec2/template/tpch/tpch_workload_6 ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; drop table if exists denorm_cached; create table denorm_cached as select --SPREAD_EVENLY-- 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 from denorm group 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; set hive.map.aggr=true; select --SPREAD_EVENLY-- count(*) from denorm_cached; select --SPREAD_EVENLY-- count(*) from denorm_cached; set mapred.reduce.tasks={{reduce_tasks}}; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; ================================================ FILE: deploy/ec2/template/tpch/tpch_workload_7 ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; drop table if exists denorm_cached; create table denorm_cached as select --SPREAD_EVENLY-- 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 from denorm group 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; set hive.map.aggr=true; select --SPREAD_EVENLY-- count(*) from denorm_cached; select --SPREAD_EVENLY-- count(*) from denorm_cached; set mapred.reduce.tasks={{reduce_tasks}}; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; ================================================ FILE: deploy/ec2/template/tpch/tpch_workload_8 ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; drop table if exists denorm_cached; create table denorm_cached as select --SPREAD_EVENLY-- 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 from denorm group 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; set hive.map.aggr=true; select --SPREAD_EVENLY-- count(*) from denorm_cached; select --SPREAD_EVENLY-- count(*) from denorm_cached; set mapred.reduce.tasks={{reduce_tasks}}; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; ================================================ FILE: deploy/ec2/template/tpch/tpch_workload_9 ================================================ set mapred.reduce.tasks={{num_partitions}}; set hive.map.aggr=false; drop table if exists denorm_cached; create table denorm_cached as select --SPREAD_EVENLY-- 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 from denorm group 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; set hive.map.aggr=true; select --SPREAD_EVENLY-- count(*) from denorm_cached; select --SPREAD_EVENLY-- count(*) from denorm_cached; set mapred.reduce.tasks={{reduce_tasks}}; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --3-- l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority from denorm_cached where o_orderdate < '1995-03-15' and l_shipdate > '1995-03-15' and c_mktsegment = 'BUILDING' group by l_orderkey, o_orderdate, o_shippriority order by revenue desc, o_orderdate limit 10; select --4-- count(1), o_orderpriority from (select distinct l_orderkey, o_orderpriority from denorm_cached where o_orderdate >= '1993-07-01' and o_orderdate < '1993-10-01' and l_commitdate < l_receiptdate) a group by o_orderpriority; select --6-- sum(l_extendedprice*l_discount) as revenue from denorm_cached where l_shipdate >= '1994-01-01' and l_shipdate < '1995-01-01' and l_discount >= 0.05 and l_discount <= 0.07 and l_quantity < 24; select --12-- l_shipmode, sum(case when o_orderpriority ='1-URGENT' or o_orderpriority ='2-HIGH' then 1 else 0 end ) as high_line_count, sum(case when o_orderpriority <> '1-URGENT' and o_orderpriority <> '2-HIGH' then 1 else 0 end ) as low_line_count from denorm_cached where l_receiptdate < '1995-01-01' and (l_shipmode = 'MAIL' or l_shipmode = 'SHIP') and l_shipdate < l_commitdate and l_receiptdate >= '1994-01-01' and l_commitdate < l_receiptdate group by l_shipmode order by l_shipmode; ================================================ FILE: deploy/ec2/template/tpch_experiment.sh ================================================ FILES=/opt/tpch_hive/* OUT_DIR=/tmp for f in $FILES do echo "Processing $f" qname=`echo $f | sed "s/.*\(q[0-9]*\).*/\1/"` results_file=$OUT_DIR/$qname.results echo "" > $results_file for t in {1..10} do /root/shark/bin/shark-withinfo -f $f 2>&1 #|grep wait >> $results_file done done ================================================ FILE: deploy/ec2/template/wipe_hdfs.sh ================================================ #!/bin/bash rm -rf /disk1/hdfs/data/* ================================================ FILE: deploy/ec2/tpch_experiments.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import os import subprocess import time num_nodes = 100 wait_delay = 20 * 60 results_dirname = "results_per_task" partitions = 33 reducers = 8 ratios = [(2, 2)] #-p (sample ratio unconstrianed), -q (sample ratio constrained) rates = [310] backend_mem = "5g" cluster_name = "tpch" sparrow_branch = "per_task_old_code" #sparrow_branch = "master" key_loc = "patkey.pem" def run_cmd(cmd): subprocess.check_call(cmd, shell=True) restart_cmd = "./ec2-exp.sh -i %s restart-spark-shark %s -m sparrow" % (key_loc, cluster_name) start_cmd = "./ec2-exp.sh -i %s start-shark-tpch %s" % (key_loc, cluster_name) for rate in rates: for (p, q) in ratios: 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" % ( cluster_name, sparrow_branch, key_loc, reducers, p, q, partitions, rate, backend_mem) run_cmd(dep_cmd) run_cmd(restart_cmd) run_cmd(start_cmd) time.sleep(wait_delay) collect_dir = "%s" % results_dirname if not os.path.exists(collect_dir): os.mkdir(collect_dir) collect_cmd = "./ec2-exp.sh -i %s collect-logs %s --log-dir=%s" % (key_loc, cluster_name, collect_dir) run_cmd(collect_cmd) analysis_dir = "%s/analysis" % collect_dir if not os.path.exists(analysis_dir): os.mkdir(analysis_dir) run_cmd("gunzip %s/*.log.gz" % collect_dir) run_cmd("python /home/ubuntu/sparrow/src/main/python/parse_tpch_logs.py 600 800 " \ "/home/ubuntu/sparrow/deploy/ec2/%s/shark_* > /home/ubuntu/sparrow/deploy/ec2/%s/tpch_results" % (collect_dir, analysis_dir)) run_cmd("/home/ubuntu/sparrow/src/main/python/parse_logs.sh start_sec=600 " \ "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" % ( collect_dir, analysis_dir, analysis_dir)) run_cmd("gzip %s/*.log" % collect_dir) ================================================ FILE: deploy/example_sparrow_configuration.conf ================================================ # This file gives a basic Sparrow configuration. Refer to # daemon/SparrowConf.java for more configuration options (e.g., how # to specify various fairness policies). deployment.mode = configbased # Change this line to have a comma-separated list of node monitors (the workers # where tasks will be run). Each node monitor should be listed as # ipaddress:port (the default node monitor port is 20502). static.node_monitors = 128.32.37.33:20502 # Name of the applicatoin using Sparrow. This can be anything -- as long as # it is consistent here and in the scheduling requests submitted. This does # not need to be changed if using the Prototype Frontend. static.app.name = testApp ================================================ FILE: deploy/third_party/boto-2.1.1/PKG-INFO ================================================ Metadata-Version: 1.0 Name: boto Version: 2.1.1 Summary: Amazon Web Services Library Home-page: http://code.google.com/p/boto/ Author: Mitch Garnaat Author-email: mitch@garnaat.com License: MIT Description: Python interface to Amazon's Web Services. Platform: Posix; MacOS X; Windows Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Topic :: Internet ================================================ FILE: deploy/third_party/boto-2.1.1/bin/bundle_image ================================================ #!/usr/bin/env python from boto.manage.server import Server if __name__ == "__main__": from optparse import OptionParser parser = OptionParser(version="%prog 1.0", usage="Usage: %prog [options] instance-id [instance-id-2]") # Commands parser.add_option("-b", "--bucket", help="Destination Bucket", dest="bucket", default=None) parser.add_option("-p", "--prefix", help="AMI Prefix", dest="prefix", default=None) parser.add_option("-k", "--key", help="Private Key File", dest="key_file", default=None) parser.add_option("-c", "--cert", help="Public Certificate File", dest="cert_file", default=None) parser.add_option("-s", "--size", help="AMI Size", dest="size", default=None) parser.add_option("-i", "--ssh-key", help="SSH Keyfile", dest="ssh_key", default=None) parser.add_option("-u", "--user-name", help="SSH Username", dest="uname", default="root") parser.add_option("-n", "--name", help="Name of Image", dest="name") (options, args) = parser.parse_args() for instance_id in args: try: s = Server.find(instance_id=instance_id).next() print "Found old server object" except StopIteration: print "New Server Object Created" s = Server.create_from_instance_id(instance_id, options.name) assert(s.hostname is not None) b = s.get_bundler(uname=options.uname) 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) ================================================ FILE: deploy/third_party/boto-2.1.1/bin/cfadmin ================================================ #!/usr/bin/env python # Author: Chris Moyer # # cfadmin is similar to sdbadmin for CloudFront, it's a simple # console utility to perform the most frequent tasks with CloudFront # def _print_distributions(dists): """Internal function to print out all the distributions provided""" print "%-12s %-50s %s" % ("Status", "Domain Name", "Origin") print "-"*80 for d in dists: print "%-12s %-50s %-30s" % (d.status, d.domain_name, d.origin) for cname in d.cnames: print " "*12, "CNAME => %s" % cname print "" def help(cf, fnc=None): """Print help message, optionally about a specific function""" import inspect self = sys.modules['__main__'] if fnc: try: cmd = getattr(self, fnc) except: cmd = None if not inspect.isfunction(cmd): print "No function named: %s found" % fnc sys.exit(2) (args, varargs, varkw, defaults) = inspect.getargspec(cmd) print cmd.__doc__ print "Usage: %s %s" % (fnc, " ".join([ "[%s]" % a for a in args[1:]])) else: print "Usage: cfadmin [command]" for cname in dir(self): if not cname.startswith("_"): cmd = getattr(self, cname) if inspect.isfunction(cmd): doc = cmd.__doc__ print "\t%s - %s" % (cname, doc) sys.exit(1) def ls(cf): """List all distributions and streaming distributions""" print "Standard Distributions" _print_distributions(cf.get_all_distributions()) print "Streaming Distributions" _print_distributions(cf.get_all_streaming_distributions()) def invalidate(cf, origin_or_id, *paths): """Create a cloudfront invalidation request""" # Allow paths to be passed using stdin if not paths: paths = [] for path in sys.stdin.readlines(): path = path.strip() if path: paths.append(path) dist = None for d in cf.get_all_distributions(): if d.id == origin_or_id or d.origin.dns_name == origin_or_id: dist = d break if not dist: print "Distribution not found: %s" % origin_or_id sys.exit(1) cf.create_invalidation_request(dist.id, paths) if __name__ == "__main__": import boto import sys cf = boto.connect_cloudfront() self = sys.modules['__main__'] if len(sys.argv) >= 2: try: cmd = getattr(self, sys.argv[1]) except: cmd = None args = sys.argv[2:] else: cmd = help args = [] if not cmd: cmd = help try: cmd(cf, *args) except TypeError, e: print e help(cf, cmd.__name__) ================================================ FILE: deploy/third_party/boto-2.1.1/bin/cq ================================================ #!/usr/bin/env python # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # import getopt, sys import boto.sqs from boto.sqs.connection import SQSConnection from boto.exception import SQSError def usage(): print 'cq [-c] [-q queue_name] [-o output_file] [-t timeout] [-r region]' def main(): try: opts, args = getopt.getopt(sys.argv[1:], 'hcq:o:t:r:', ['help', 'clear', 'queue', 'output', 'timeout', 'region']) except: usage() sys.exit(2) queue_name = '' output_file = '' timeout = 30 region = '' clear = False for o, a in opts: if o in ('-h', '--help'): usage() sys.exit() if o in ('-q', '--queue'): queue_name = a if o in ('-o', '--output'): output_file = a if o in ('-c', '--clear'): clear = True if o in ('-t', '--timeout'): timeout = int(a) if o in ('-r', '--region'): region = a if region: c = boto.sqs.connect_to_region(region) else: c = SQSConnection() if queue_name: try: rs = [c.create_queue(queue_name)] except SQSError, e: print 'An Error Occurred:' print '%s: %s' % (e.status, e.reason) print e.body sys.exit() else: try: rs = c.get_all_queues() except SQSError, e: print 'An Error Occurred:' print '%s: %s' % (e.status, e.reason) print e.body sys.exit() for q in rs: if clear: n = q.clear() print 'clearing %d messages from %s' % (n, q.id) elif output_file: q.dump(output_file) else: print q.id, q.count(vtimeout=timeout) if __name__ == "__main__": main() ================================================ FILE: deploy/third_party/boto-2.1.1/bin/cwutil ================================================ #!/usr/bin/env python # Author: Chris Moyer # Description: CloudWatch Utility # For listing stats, creating alarms, and managing # other CloudWatch aspects import boto cw = boto.connect_cloudwatch() from datetime import datetime, timedelta def _parse_time(time_string): """Internal function to parse a time string""" def _parse_dict(d_string): result = {} if d_string: for d in d_string.split(","): d = d.split(":") result[d[0]] = d[1] return result def ls(namespace=None): """ List metrics, optionally filtering by a specific namespace namespace: Optional Namespace to filter on """ print "%-10s %-50s %s" % ("Namespace", "Metric Name", "Dimensions") print "-"*80 for m in cw.list_metrics(): if namespace is None or namespace.upper() in m.namespace: print "%-10s %-50s %s" % (m.namespace, m.name, m.dimensions) def stats(namespace, metric_name, dimensions=None, statistics="Average", start_time=None, end_time=None, period=60, unit=None): """ Lists the statistics for a specific metric namespace: The namespace to use, usually "AWS/EC2", "AWS/SQS", etc. metric_name: The name of the metric to track, pulled from `ls` dimensions: The dimensions to use, formatted as Name:Value (such as QueueName:myQueue) statistics: The statistics to measure, defaults to "Average" 'Minimum', 'Maximum', 'Sum', 'Average', 'SampleCount' start_time: Start time, default to now - 1 day end_time: End time, default to now period: Period/interval for counts, default to 60 minutes unit: Unit to track, default depends on what metric is being tracked """ # Parse the dimensions dimensions = _parse_dict(dimensions) # Parse the times if end_time: end_time = _parse_time(end_time) else: end_time = datetime.utcnow() if start_time: start_time = _parse_time(start_time) else: start_time = datetime.utcnow() - timedelta(days=1) print "%-30s %s" % ('Timestamp', statistics) print "-"*50 data = {} for m in cw.get_metric_statistics(int(period), start_time, end_time, metric_name, namespace, statistics, dimensions, unit): data[m['Timestamp']] = m[statistics] keys = data.keys() keys.sort() for k in keys: print "%-30s %s" % (k, data[k]) def put(namespace, metric_name, dimensions=None, value=None, unit=None, statistics=None, timestamp=None): """ Publish custom metrics namespace: The namespace to use; values starting with "AWS/" are reserved metric_name: The name of the metric to update dimensions: The dimensions to use, formatted as Name:Value (such as QueueName:myQueue) value: The value to store, mutually exclusive with `statistics` statistics: The statistics to store, mutually exclusive with `value` (must specify all of "Minimum", "Maximum", "Sum", "SampleCount") timestamp: The timestamp of this measurement, default is current server time unit: Unit to track, default depends on what metric is being tracked """ def simplify(lst): return lst[0] if len(lst) == 1 else lst print cw.put_metric_data(namespace, simplify(metric_name.split(';')), dimensions = simplify(map(_parse_dict, dimensions.split(';'))) if dimensions else None, value = simplify(value.split(';')) if value else None, statistics = simplify(map(_parse_dict, statistics.split(';'))) if statistics else None, timestamp = simplify(timestamp.split(';')) if timestamp else None, unit = simplify(unit.split(';')) if unit else None) def help(fnc=None): """ Print help message, optionally about a specific function """ import inspect self = sys.modules['__main__'] if fnc: try: cmd = getattr(self, fnc) except: cmd = None if not inspect.isfunction(cmd): print "No function named: %s found" % fnc sys.exit(2) (args, varargs, varkw, defaults) = inspect.getargspec(cmd) print cmd.__doc__ print "Usage: %s %s" % (fnc, " ".join([ "[%s]" % a for a in args])) else: print "Usage: cwutil [command]" for cname in dir(self): if not cname.startswith("_") and not cname == "cmd": cmd = getattr(self, cname) if inspect.isfunction(cmd): doc = cmd.__doc__ print "\t%s - %s" % (cname, doc) sys.exit(1) if __name__ == "__main__": import sys self = sys.modules['__main__'] if len(sys.argv) >= 2: try: cmd = getattr(self, sys.argv[1]) except: cmd = None args = sys.argv[2:] else: cmd = help args = [] if not cmd: cmd = help try: cmd(*args) except TypeError, e: print e help(cmd.__name__) ================================================ FILE: deploy/third_party/boto-2.1.1/bin/elbadmin ================================================ #!/usr/bin/env python # Copyright (c) 2009 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # # Elastic Load Balancer Tool # VERSION="0.1" usage = """%prog [options] [command] Commands: list|ls List all Elastic Load Balancers delete Delete ELB get Get all instances associated with create Create an ELB add Add in ELB remove|rm Remove from ELB enable|en Enable Zone for ELB disable Disable Zone for ELB addl Add listeners (specified by -l) to the ELB rml Remove Listener(s) specified by the port on the ELB """ def list(elb): """List all ELBs""" print "%-20s %s" % ("Name", "DNS Name") print "-"*80 for b in elb.get_all_load_balancers(): print "%-20s %s" % (b.name, b.dns_name) def get(elb, name): """Get details about ELB """ elbs = elb.get_all_load_balancers(name) if len(elbs) < 1: print "No load balancer by the name of %s found" % name return for b in elbs: if name in b.name: print "="*80 print "Name: %s" % b.name print "DNS Name: %s" % b.dns_name print print "Listeners" print "---------" print "%-8s %-8s %s" % ("IN", "OUT", "PROTO") for l in b.listeners: print "%-8s %-8s %s" % (l[0], l[1], l[2]) print print " Zones " print "---------" for z in b.availability_zones: print z print print "Instances" print "---------" for i in b.instances: print i.id print def create(elb, name, zones, listeners): """Create an ELB named """ l_list = [] for l in listeners: l = l.split(",") if l[2]=='HTTPS': l_list.append((int(l[0]), int(l[1]), l[2], l[3])) else : l_list.append((int(l[0]), int(l[1]), l[2])) b = elb.create_load_balancer(name, zones, l_list) return get(elb, name) def delete(elb, name): """Delete this ELB""" b = elb.get_all_load_balancers(name) if len(b) < 1: print "No load balancer by the name of %s found" % name return for i in b: if name in i.name: i.delete() print "Load Balancer %s deleted" % name def add_instance(elb, name, instance): """Add to ELB """ b = elb.get_all_load_balancers(name) if len(b) < 1: print "No load balancer by the name of %s found" % name return for i in b: if name in i.name: i.register_instances([instance]) return get(elb, name) def remove_instance(elb, name, instance): """Remove instance from elb """ b = elb.get_all_load_balancers(name) if len(b) < 1: print "No load balancer by the name of %s found" % name return for i in b: if name in i.name: i.deregister_instances([instance]) return get(elb, name) def enable_zone(elb, name, zone): """Enable for elb""" b = elb.get_all_load_balancers(name) if len(b) < 1: print "No load balancer by the name of %s found" % name return b = b[0] b.enable_zones([zone]) return get(elb, name) def disable_zone(elb, name, zone): """Disable for elb""" b = elb.get_all_load_balancers(name) if len(b) < 1: print "No load balancer by the name of %s found" % name return b = b[0] b.disable_zones([zone]) return get(elb, name) def add_listener(elb, name, listeners): """Add listeners to a given load balancer""" l_list = [] for l in listeners: l = l.split(",") l_list.append((int(l[0]), int(l[1]), l[2])) b = elb.get_all_load_balancers(name) if len(b) < 1: print "No load balancer by the name of %s found" % name return b = b[0] b.create_listeners(l_list) return get(elb, name) def rm_listener(elb, name, ports): """Remove listeners from a given load balancer""" b = elb.get_all_load_balancers(name) if len(b) < 1: print "No load balancer by the name of %s found" % name return b = b[0] b.delete_listeners(ports) return get(elb, name) if __name__ == "__main__": try: import readline except ImportError: pass import boto import sys from optparse import OptionParser from boto.mashups.iobject import IObject parser = OptionParser(version=VERSION, usage=usage) parser.add_option("-z", "--zone", help="Operate on zone", action="append", default=[], dest="zones") parser.add_option("-l", "--listener", help="Specify Listener in,out,proto", action="append", default=[], dest="listeners") (options, args) = parser.parse_args() if len(args) < 1: parser.print_help() sys.exit(1) elb = boto.connect_elb() print "%s" % (elb.region.endpoint) command = args[0].lower() if command in ("ls", "list"): list(elb) elif command == "get": get(elb, args[1]) elif command == "create": create(elb, args[1], options.zones, options.listeners) elif command == "delete": delete(elb, args[1]) elif command in ("add", "put"): add_instance(elb, args[1], args[2]) elif command in ("rm", "remove"): remove_instance(elb, args[1], args[2]) elif command in ("en", "enable"): enable_zone(elb, args[1], args[2]) elif command == "disable": disable_zone(elb, args[1], args[2]) elif command == "addl": add_listener(elb, args[1], options.listeners) elif command == "rml": rm_listener(elb, args[1], args[2:]) ================================================ FILE: deploy/third_party/boto-2.1.1/bin/fetch_file ================================================ #!/usr/bin/env python # Copyright (c) 2009 Chris Moyer http://coredumped.org # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # if __name__ == "__main__": from optparse import OptionParser parser = OptionParser(version="0.1", usage="Usage: %prog [options] url") parser.add_option("-o", "--out-file", help="Output file", dest="outfile") (options, args) = parser.parse_args() if len(args) < 1: parser.print_help() exit(1) from boto.utils import fetch_file f = fetch_file(args[0]) if options.outfile: open(options.outfile, "w").write(f.read()) else: print f.read() ================================================ FILE: deploy/third_party/boto-2.1.1/bin/kill_instance ================================================ #!/usr/bin/env python import sys from optparse import OptionParser import boto from boto.ec2 import regions def kill_instance(region, ids): """Kill an instances given it's instance IDs""" # Connect the region ec2 = boto.connect_ec2(region=region) for instance_id in ids: print "Stopping instance: %s" % instance_id ec2.terminate_instances([instance_id]) if __name__ == "__main__": parser = OptionParser(usage="kill_instance [-r] id [id ...]") parser.add_option("-r", "--region", help="Region (default us-east-1)", dest="region", default="us-east-1") (options, args) = parser.parse_args() if not args: parser.print_help() sys.exit(1) for r in regions(): if r.name == options.region: region = r break else: print "Region %s not found." % options.region sys.exit(1) kill_instance(region, args) ================================================ FILE: deploy/third_party/boto-2.1.1/bin/launch_instance ================================================ #!/usr/bin/env python # Copyright (c) 2009 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # # Utility to launch an EC2 Instance # VERSION="0.2" CLOUD_INIT_SCRIPT = """#!/usr/bin/env python f = open("/etc/boto.cfg", "w") f.write(\"\"\"%s\"\"\") f.close() """ import boto.pyami.config import boto.utils import re, os import ConfigParser class Config(boto.pyami.config.Config): """A special config class that also adds import abilities Directly in the config file. To have a config file import another config file, simply use "#import " where is either a relative path or a full URL to another config """ def __init__(self): ConfigParser.SafeConfigParser.__init__(self, {'working_dir' : '/mnt/pyami', 'debug' : '0'}) def add_config(self, file_url): """Add a config file to this configuration :param file_url: URL for the file to add, or a local path :type file_url: str """ if not re.match("^([a-zA-Z0-9]*:\/\/)(.*)", file_url): if not file_url.startswith("/"): file_url = os.path.join(os.getcwd(), file_url) file_url = "file://%s" % file_url (base_url, file_name) = file_url.rsplit("/", 1) base_config = boto.utils.fetch_file(file_url) base_config.seek(0) for line in base_config.readlines(): match = re.match("^#import[\s\t]*([^\s^\t]*)[\s\t]*$", line) if match: self.add_config("%s/%s" % (base_url, match.group(1))) base_config.seek(0) self.readfp(base_config) def add_creds(self, ec2): """Add the credentials to this config if they don't already exist""" if not self.has_section('Credentials'): self.add_section('Credentials') self.set('Credentials', 'aws_access_key_id', ec2.aws_access_key_id) self.set('Credentials', 'aws_secret_access_key', ec2.aws_secret_access_key) def __str__(self): """Get config as string""" from StringIO import StringIO s = StringIO() self.write(s) return s.getvalue() SCRIPTS = [] def scripts_callback(option, opt, value, parser): arg = value.split(',') if len(arg) == 1: SCRIPTS.append(arg[0]) else: SCRIPTS.extend(arg) setattr(parser.values, option.dest, SCRIPTS) def add_script(scr_url): """Read a script and any scripts that are added using #import""" base_url = '/'.join(scr_url.split('/')[:-1]) + '/' script_raw = boto.utils.fetch_file(scr_url) script_content = '' for line in script_raw.readlines(): match = re.match("^#import[\s\t]*([^\s^\t]*)[\s\t]*$", line) #if there is an import if match: #Read the other script and put it in that spot script_content += add_script("%s/%s" % (base_url, match.group(1))) else: #Otherwise, add the line and move on script_content += line return script_content if __name__ == "__main__": try: import readline except ImportError: pass import sys import time import boto from boto.ec2 import regions from optparse import OptionParser from boto.mashups.iobject import IObject parser = OptionParser(version=VERSION, usage="%prog [options] config_url") parser.add_option("-c", "--max-count", help="Maximum number of this type of instance to launch", dest="max_count", default="1") parser.add_option("--min-count", help="Minimum number of this type of instance to launch", dest="min_count", default="1") 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") parser.add_option("-g", "--groups", help="Security Groups to add this instance to", action="append", dest="groups") parser.add_option("-a", "--ami", help="AMI to launch", dest="ami_id") parser.add_option("-t", "--type", help="Type of Instance (default m1.small)", dest="type", default="m1.small") parser.add_option("-k", "--key", help="Keypair", dest="key_name") parser.add_option("-z", "--zone", help="Zone (default us-east-1a)", dest="zone", default="us-east-1a") parser.add_option("-r", "--region", help="Region (default us-east-1)", dest="region", default="us-east-1") parser.add_option("-i", "--ip", help="Elastic IP", dest="elastic_ip") parser.add_option("-n", "--no-add-cred", help="Don't add a credentials section", default=False, action="store_true", dest="nocred") parser.add_option("--save-ebs", help="Save the EBS volume on shutdown, instead of deleting it", default=False, action="store_true", dest="save_ebs") parser.add_option("-w", "--wait", help="Wait until instance is running", default=False, action="store_true", dest="wait") parser.add_option("-d", "--dns", help="Returns public and private DNS (implicates --wait)", default=False, action="store_true", dest="dns") parser.add_option("-T", "--tag", help="Set tag", default=None, action="append", dest="tags", metavar="key:value") 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) (options, args) = parser.parse_args() if len(args) < 1: parser.print_help() sys.exit(1) file_url = os.path.expanduser(args[0]) cfg = Config() cfg.add_config(file_url) for r in regions(): if r.name == options.region: region = r break else: print "Region %s not found." % options.region sys.exit(1) ec2 = boto.connect_ec2(region=region) if not options.nocred: cfg.add_creds(ec2) iobj = IObject() if options.ami_id: ami = ec2.get_image(options.ami_id) else: ami_id = options.ami_id l = [(a, a.id, a.location) for a in ec2.get_all_images()] ami = iobj.choose_from_list(l, prompt='Choose AMI') if options.key_name: key_name = options.key_name else: l = [(k, k.name, '') for k in ec2.get_all_key_pairs()] key_name = iobj.choose_from_list(l, prompt='Choose Keypair').name if options.groups: groups = options.groups else: groups = [] l = [(g, g.name, g.description) for g in ec2.get_all_security_groups()] g = iobj.choose_from_list(l, prompt='Choose Primary Security Group') while g != None: groups.append(g) l.remove((g, g.name, g.description)) g = iobj.choose_from_list(l, prompt='Choose Additional Security Group (0 to quit)') user_data = str(cfg) # If it's a cloud init AMI, # then we need to wrap the config in our # little wrapper shell script if options.cloud_init: user_data = CLOUD_INIT_SCRIPT % user_data scriptuples = [] if options.scripts: scripts = options.scripts scriptuples.append(('user_data', user_data)) for scr in scripts: scr_url = scr if not re.match("^([a-zA-Z0-9]*:\/\/)(.*)", scr_url): if not scr_url.startswith("/"): scr_url = os.path.join(os.getcwd(), scr_url) try: newfiles = os.listdir(scr_url) for f in newfiles: #put the scripts in the folder in the array such that they run in the correct order scripts.insert(scripts.index(scr) + 1, scr.split("/")[-1] + "/" + f) except OSError: scr_url = "file://%s" % scr_url try: scriptuples.append((scr, add_script(scr_url))) except Exception, e: pass user_data = boto.utils.write_mime_multipart(scriptuples, compress=True) shutdown_proc = "terminate" if options.save_ebs: shutdown_proc = "save" r = ami.run(min_count=int(options.min_count), max_count=int(options.max_count), key_name=key_name, user_data=user_data, security_groups=groups, instance_type=options.type, placement=options.zone, instance_initiated_shutdown_behavior=shutdown_proc) instance = r.instances[0] if options.tags: for tag_pair in options.tags: name = tag_pair value = '' if ':' in tag_pair: name, value = tag_pair.split(':', 1) instance.add_tag(name, value) if options.dns: options.wait = True if not options.wait: sys.exit(0) while True: instance.update() if instance.state == 'running': break time.sleep(3) if options.dns: print "Public DNS name: %s" % instance.public_dns_name print "Private DNS name: %s" % instance.private_dns_name ================================================ FILE: deploy/third_party/boto-2.1.1/bin/list_instances ================================================ #!/usr/bin/env python import sys from operator import attrgetter from optparse import OptionParser import boto from boto.ec2 import regions HEADERS = { 'ID': {'get': attrgetter('id'), 'length':15}, 'Zone': {'get': attrgetter('placement'), 'length':15}, 'Groups': {'get': attrgetter('groups'), 'length':30}, 'Hostname': {'get': attrgetter('public_dns_name'), 'length':50}, 'State': {'get': attrgetter('state'), 'length':15}, 'Image': {'get': attrgetter('image_id'), 'length':15}, 'Type': {'get': attrgetter('instance_type'), 'length':15}, 'IP': {'get': attrgetter('ip_address'), 'length':16}, 'PrivateIP': {'get': attrgetter('private_ip_address'), 'length':16}, 'Key': {'get': attrgetter('key_name'), 'length':25}, 'T:': {'length': 30}, } def get_column(name, instance=None): if name.startswith('T:'): _, tag = name.split(':', 1) return instance.tags.get(tag, '') return HEADERS[name]['get'](instance) def main(): parser = OptionParser() parser.add_option("-r", "--region", help="Region (default us-east-1)", dest="region", default="us-east-1") 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") (options, args) = parser.parse_args() # Connect the region for r in regions(): if r.name == options.region: region = r break else: print "Region %s not found." % options.region sys.exit(1) ec2 = boto.connect_ec2(region=region) # Read headers if options.headers: headers = tuple(options.headers.split(',')) else: headers = ("ID", 'Zone', "Groups", "Hostname") # Create format string format_string = "" for h in headers: if h.startswith('T:'): format_string += "%%-%ds" % HEADERS['T:']['length'] else: format_string += "%%-%ds" % HEADERS[h]['length'] # List and print print format_string % headers print "-" * len(format_string % headers) for r in ec2.get_all_instances(): groups = [g.id for g in r.groups] for i in r.instances: i.groups = ','.join(groups) print format_string % tuple(get_column(h, i) for h in headers) if __name__ == "__main__": main() ================================================ FILE: deploy/third_party/boto-2.1.1/bin/lss3 ================================================ #!/usr/bin/env python import boto from boto.s3.connection import OrdinaryCallingFormat def sizeof_fmt(num): for x in ['b ','KB','MB','GB','TB', 'XB']: if num < 1024.0: return "%3.1f %s" % (num, x) num /= 1024.0 return "%3.1f %s" % (num, x) def list_bucket(b, prefix=None): """List everything in a bucket""" from boto.s3.prefix import Prefix from boto.s3.key import Key total = 0 query = b if prefix: if not prefix.endswith("/"): prefix = prefix + "/" query = b.list(prefix=prefix, delimiter="/") print "%s" % prefix num = 0 for k in query: num += 1 mode = "-rwx---" if isinstance(k, Prefix): mode = "drwxr--" size = 0 else: size = k.size for g in k.get_acl().acl.grants: if g.id == None: if g.permission == "READ": mode = "-rwxr--" elif g.permission == "FULL_CONTROL": mode = "-rwxrwx" if isinstance(k, Key): print "%s\t%s\t%010s\t%s" % (mode, k.last_modified, sizeof_fmt(size), k.name) else: #If it's not a Key object, it doesn't have a last_modified time, so #print nothing instead print "%s\t%s\t%010s\t%s" % (mode, ' '*24, sizeof_fmt(size), k.name) total += size print "="*80 print "\t\tTOTAL: \t%010s \t%i Files" % (sizeof_fmt(total), num) def list_buckets(s3): """List all the buckets""" for b in s3.get_all_buckets(): print b.name if __name__ == "__main__": import sys pairs = [] mixedCase = False for name in sys.argv[1:]: if "/" in name: pairs.append(name.split("/",1)) else: pairs.append([name, None]) if pairs[-1][0].lower() != pairs[-1][0]: mixedCase = True if mixedCase: s3 = boto.connect_s3(calling_format=OrdinaryCallingFormat()) else: s3 = boto.connect_s3() if len(sys.argv) < 2: list_buckets(s3) else: for name, prefix in pairs: list_bucket(s3.get_bucket(name), prefix) ================================================ FILE: deploy/third_party/boto-2.1.1/bin/pyami_sendmail ================================================ #!/usr/bin/env python # Copyright (c) 2010 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # # Send Mail from a PYAMI instance, or anything that has a boto.cfg # properly set up # VERSION="0.1" usage = """%prog [options] Sends whatever is on stdin to the recipient specified by your boto.cfg or whoevery you specify in the options here. """ if __name__ == "__main__": from boto.utils import notify import sys from optparse import OptionParser parser = OptionParser(version=VERSION, usage=usage) parser.add_option("-t", "--to", help="Optional to address to send to (default from your boto.cfg)", action="store", default=None, dest="to") parser.add_option("-s", "--subject", help="Optional Subject to send this report as", action="store", default="Report", dest="subject") parser.add_option("-f", "--file", help="Optionally, read from a file instead of STDIN", action="store", default=None, dest="file") parser.add_option("--html", help="HTML Format the email", action="store_true", default=False, dest="html") parser.add_option("--no-instance-id", help="If set, don't append the instance id", action="store_false", default=True, dest="append_instance_id") (options, args) = parser.parse_args() if options.file: body = open(options.file, 'r').read() else: body = sys.stdin.read() if options.html: notify(options.subject, html_body=body, to_string=options.to, append_instance_id=options.append_instance_id) else: notify(options.subject, body=body, to_string=options.to, append_instance_id=options.append_instance_id) ================================================ FILE: deploy/third_party/boto-2.1.1/bin/route53 ================================================ #!/usr/bin/env python # Author: Chris Moyer # # route53 is similar to sdbadmin for Route53, it's a simple # console utility to perform the most frequent tasks with Route53 def _print_zone_info(zoneinfo): print "="*80 print "| ID: %s" % zoneinfo['Id'].split("/")[-1] print "| Name: %s" % zoneinfo['Name'] print "| Ref: %s" % zoneinfo['CallerReference'] print "="*80 print zoneinfo['Config'] print def create(conn, hostname, caller_reference=None, comment=''): """Create a hosted zone, returning the nameservers""" response = conn.create_hosted_zone(hostname, caller_reference, comment) print "Pending, please add the following Name Servers:" for ns in response.NameServers: print "\t", ns def delete_zone(conn, hosted_zone_id): """Delete a hosted zone by ID""" response = conn.delete_hosted_zone(hosted_zone_id) print response def ls(conn): """List all hosted zones""" response = conn.get_all_hosted_zones() for zoneinfo in response['ListHostedZonesResponse']['HostedZones']: _print_zone_info(zoneinfo) def get(conn, hosted_zone_id, type=None, name=None, maxitems=None): """Get all the records for a single zone""" response = conn.get_all_rrsets(hosted_zone_id, type, name, maxitems=maxitems) # If a maximum number of items was set, we limit to that number # by turning the response into an actual list (copying it) # instead of allowing it to page if maxitems: response = response[:] print '%-40s %-5s %-20s %s' % ("Name", "Type", "TTL", "Value(s)") for record in response: print '%-40s %-5s %-20s %s' % (record.name, record.type, record.ttl, record.to_print()) def add_record(conn, hosted_zone_id, name, type, values, ttl=600, comment=""): """Add a new record to a zone""" from boto.route53.record import ResourceRecordSets changes = ResourceRecordSets(conn, hosted_zone_id, comment) change = changes.add_change("CREATE", name, type, ttl) for value in values.split(','): change.add_value(value) print changes.commit() def del_record(conn, hosted_zone_id, name, type, values, ttl=600, comment=""): """Delete a record from a zone""" from boto.route53.record import ResourceRecordSets changes = ResourceRecordSets(conn, hosted_zone_id, comment) change = changes.add_change("DELETE", name, type, ttl) for value in values.split(','): change.add_value(value) print changes.commit() def add_alias(conn, hosted_zone_id, name, type, alias_hosted_zone_id, alias_dns_name, comment=""): """Add a new alias to a zone""" from boto.route53.record import ResourceRecordSets changes = ResourceRecordSets(conn, hosted_zone_id, comment) change = changes.add_change("CREATE", name, type) change.set_alias(alias_hosted_zone_id, alias_dns_name) print changes.commit() def del_alias(conn, hosted_zone_id, name, type, alias_hosted_zone_id, alias_dns_name, comment=""): """Delete an alias from a zone""" from boto.route53.record import ResourceRecordSets changes = ResourceRecordSets(conn, hosted_zone_id, comment) change = changes.add_change("DELETE", name, type) change.set_alias(alias_hosted_zone_id, alias_dns_name) print changes.commit() def change_record(conn, hosted_zone_id, name, type, values, ttl=600, comment=""): """Delete and then add a record to a zone""" from boto.route53.record import ResourceRecordSets changes = ResourceRecordSets(conn, hosted_zone_id, comment) response = conn.get_all_rrsets(hosted_zone_id, type, name, maxitems=1)[0] change1 = changes.add_change("DELETE", name, type, response.ttl) for old_value in response.resource_records: change1.add_value(old_value) change2 = changes.add_change("CREATE", name, type, ttl) for new_value in values.split(','): change2.add_value(new_value) print changes.commit() def help(conn, fnc=None): """Prints this help message""" import inspect self = sys.modules['__main__'] if fnc: try: cmd = getattr(self, fnc) except: cmd = None if not inspect.isfunction(cmd): print "No function named: %s found" % fnc sys.exit(2) (args, varargs, varkw, defaults) = inspect.getargspec(cmd) print cmd.__doc__ print "Usage: %s %s" % (fnc, " ".join([ "[%s]" % a for a in args[1:]])) else: print "Usage: route53 [command]" for cname in dir(self): if not cname.startswith("_"): cmd = getattr(self, cname) if inspect.isfunction(cmd): doc = cmd.__doc__ print "\t%-20s %s" % (cname, doc) sys.exit(1) if __name__ == "__main__": import boto import sys conn = boto.connect_route53() self = sys.modules['__main__'] if len(sys.argv) >= 2: try: cmd = getattr(self, sys.argv[1]) except: cmd = None args = sys.argv[2:] else: cmd = help args = [] if not cmd: cmd = help try: cmd(conn, *args) except TypeError, e: print e help(conn, cmd.__name__) ================================================ FILE: deploy/third_party/boto-2.1.1/bin/s3multiput ================================================ #!/usr/bin/env python # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # # multipart portions copyright Fabian Topfstedt # https://gist.github.com/924094 import math import mimetypes from multiprocessing import Pool import getopt, sys, os import boto from boto.exception import S3ResponseError from boto.s3.connection import S3Connection from filechunkio import FileChunkIO usage_string = """ SYNOPSIS s3put [-a/--access_key ] [-s/--secret_key ] -b/--bucket [-c/--callback ] [-d/--debug ] [-i/--ignore ] [-n/--no_op] [-p/--prefix ] [-q/--quiet] [-g/--grant grant] [-w/--no_overwrite] [-r/--reduced] path Where access_key - Your AWS Access Key ID. If not supplied, boto will use the value of the environment variable AWS_ACCESS_KEY_ID secret_key - Your AWS Secret Access Key. If not supplied, boto will use the value of the environment variable AWS_SECRET_ACCESS_KEY bucket_name - The name of the S3 bucket the file(s) should be copied to. path - A path to a directory or file that represents the items to be uploaded. If the path points to an individual file, that file will be uploaded to the specified bucket. If the path points to a directory, s3_it will recursively traverse the directory and upload all files to the specified bucket. debug_level - 0 means no debug output (default), 1 means normal debug output from boto, and 2 means boto debug output plus request/response output from httplib ignore_dirs - a comma-separated list of directory names that will be ignored and not uploaded to S3. num_cb - The number of progress callbacks to display. The default is zero which means no callbacks. If you supplied a value of "-c 10" for example, the progress callback would be called 10 times for each file transferred. prefix - A file path prefix that will be stripped from the full path of the file when determining the key name in S3. For example, if the full path of a file is: /home/foo/bar/fie.baz and the prefix is specified as "-p /home/foo/" the resulting key name in S3 will be: /bar/fie.baz The prefix must end in a trailing separator and if it does not then one will be added. reduced - Use Reduced Redundancy storage grant - A canned ACL policy that will be granted on each file transferred to S3. The value of provided must be one of the "canned" ACL policies supported by S3: private|public-read|public-read-write|authenticated-read no_overwrite - No files will be overwritten on S3, if the file/key exists on s3 it will be kept. This is useful for resuming interrupted transfers. Note this is not a sync, even if the file has been updated locally if the key exists on s3 the file on s3 will not be updated. If the -n option is provided, no files will be transferred to S3 but informational messages will be printed about what would happen. """ def usage(): print usage_string sys.exit() def submit_cb(bytes_so_far, total_bytes): print '%d bytes transferred / %d bytes total' % (bytes_so_far, total_bytes) def get_key_name(fullpath, prefix): key_name = fullpath[len(prefix):] l = key_name.split(os.sep) return '/'.join(l) def _upload_part(bucketname, aws_key, aws_secret, multipart_id, part_num, source_path, offset, bytes, debug, cb, num_cb, amount_of_retries=10): if debug == 1: print "_upload_part(%s, %s, %s)" % (source_path, offset, bytes) """ Uploads a part with retries. """ def _upload(retries_left=amount_of_retries): try: if debug == 1: print 'Start uploading part #%d ...' % part_num conn = S3Connection(aws_key, aws_secret) conn.debug = debug bucket = conn.get_bucket(bucketname) for mp in bucket.get_all_multipart_uploads(): if mp.id == multipart_id: with FileChunkIO(source_path, 'r', offset=offset, bytes=bytes) as fp: mp.upload_part_from_file(fp=fp, part_num=part_num, cb=cb, num_cb=num_cb) break except Exception, exc: if retries_left: _upload(retries_left=retries_left - 1) else: print 'Failed uploading part #%d' % part_num raise exc else: if debug == 1: print '... Uploaded part #%d' % part_num _upload() def upload(bucketname, aws_key, aws_secret, source_path, keyname, reduced, debug, cb, num_cb, acl='private', headers={}, guess_mimetype=True, parallel_processes=4): """ Parallel multipart upload. """ conn = S3Connection(aws_key, aws_secret) conn.debug = debug bucket = conn.get_bucket(bucketname) if guess_mimetype: mtype = mimetypes.guess_type(keyname)[0] or 'application/octet-stream' headers.update({'Content-Type': mtype}) mp = bucket.initiate_multipart_upload(keyname, headers=headers, reduced_redundancy=reduced) source_size = os.stat(source_path).st_size bytes_per_chunk = max(int(math.sqrt(5242880) * math.sqrt(source_size)), 5242880) chunk_amount = int(math.ceil(source_size / float(bytes_per_chunk))) pool = Pool(processes=parallel_processes) for i in range(chunk_amount): offset = i * bytes_per_chunk remaining_bytes = source_size - offset bytes = min([bytes_per_chunk, remaining_bytes]) part_num = i + 1 pool.apply_async(_upload_part, [bucketname, aws_key, aws_secret, mp.id, part_num, source_path, offset, bytes, debug, cb, num_cb]) pool.close() pool.join() if len(mp.get_all_parts()) == chunk_amount: mp.complete_upload() key = bucket.get_key(keyname) key.set_acl(acl) else: mp.cancel_upload() def main(): # default values aws_access_key_id = None aws_secret_access_key = None bucket_name = '' ignore_dirs = [] total = 0 debug = 0 cb = None num_cb = 0 quiet = False no_op = False prefix = '/' grant = None no_overwrite = False reduced = False try: opts, args = getopt.getopt(sys.argv[1:], 'a:b:c::d:g:hi:np:qs:wr', ['access_key', 'bucket', 'callback', 'debug', 'help', 'grant', 'ignore', 'no_op', 'prefix', 'quiet', 'secret_key', 'no_overwrite', 'reduced']) except: usage() # parse opts for o, a in opts: if o in ('-h', '--help'): usage() if o in ('-a', '--access_key'): aws_access_key_id = a if o in ('-b', '--bucket'): bucket_name = a if o in ('-c', '--callback'): num_cb = int(a) cb = submit_cb if o in ('-d', '--debug'): debug = int(a) if o in ('-g', '--grant'): grant = a if o in ('-i', '--ignore'): ignore_dirs = a.split(',') if o in ('-n', '--no_op'): no_op = True if o in ('w', '--no_overwrite'): no_overwrite = True if o in ('-p', '--prefix'): prefix = a if prefix[-1] != os.sep: prefix = prefix + os.sep if o in ('-q', '--quiet'): quiet = True if o in ('-s', '--secret_key'): aws_secret_access_key = a if o in ('-r', '--reduced'): reduced = True if len(args) != 1: usage() path = os.path.expanduser(args[0]) path = os.path.expandvars(path) path = os.path.abspath(path) if not bucket_name: print "bucket name is required!" usage() c = boto.connect_s3(aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key) c.debug = debug b = c.get_bucket(bucket_name) # upload a directory of files recursively if os.path.isdir(path): if no_overwrite: if not quiet: print 'Getting list of existing keys to check against' keys = [] for key in b.list(): keys.append(key.name) for root, dirs, files in os.walk(path): for ignore in ignore_dirs: if ignore in dirs: dirs.remove(ignore) for file in files: fullpath = os.path.join(root, file) key_name = get_key_name(fullpath, prefix) copy_file = True if no_overwrite: if key_name in keys: copy_file = False if not quiet: print 'Skipping %s as it exists in s3' % file if copy_file: if not quiet: print 'Copying %s to %s/%s' % (file, bucket_name, key_name) if not no_op: if os.stat(fullpath).st_size == 0: # 0-byte files don't work and also don't need multipart upload k = b.new_key(key_name) k.set_contents_from_filename(fullpath, cb=cb, num_cb=num_cb, policy=grant, reduced_redundancy=reduced) else: upload(bucket_name, aws_access_key_id, aws_secret_access_key, fullpath, key_name, reduced, debug, cb, num_cb) total += 1 # upload a single file elif os.path.isfile(path): key_name = get_key_name(os.path.abspath(path), prefix) copy_file = True if no_overwrite: if b.get_key(key_name): copy_file = False if not quiet: print 'Skipping %s as it exists in s3' % path if copy_file: if not quiet: print 'Copying %s to %s/%s' % (path, bucket_name, key_name) if not no_op: if os.stat(path).st_size == 0: # 0-byte files don't work and also don't need multipart upload k = b.new_key(key_name) k.set_contents_from_filename(path, cb=cb, num_cb=num_cb, policy=grant, reduced_redundancy=reduced) else: upload(bucket_name, aws_access_key_id, aws_secret_access_key, path, key_name, reduced, debug, cb, num_cb) if __name__ == "__main__": main() ================================================ FILE: deploy/third_party/boto-2.1.1/bin/s3put ================================================ #!/usr/bin/env python # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # import getopt, sys, os import boto from boto.exception import S3ResponseError usage_string = """ SYNOPSIS s3put [-a/--access_key ] [-s/--secret_key ] -b/--bucket [-c/--callback ] [-d/--debug ] [-i/--ignore ] [-n/--no_op] [-p/--prefix ] [-q/--quiet] [-g/--grant grant] [-w/--no_overwrite] [-r/--reduced] path Where access_key - Your AWS Access Key ID. If not supplied, boto will use the value of the environment variable AWS_ACCESS_KEY_ID secret_key - Your AWS Secret Access Key. If not supplied, boto will use the value of the environment variable AWS_SECRET_ACCESS_KEY bucket_name - The name of the S3 bucket the file(s) should be copied to. path - A path to a directory or file that represents the items to be uploaded. If the path points to an individual file, that file will be uploaded to the specified bucket. If the path points to a directory, s3_it will recursively traverse the directory and upload all files to the specified bucket. debug_level - 0 means no debug output (default), 1 means normal debug output from boto, and 2 means boto debug output plus request/response output from httplib ignore_dirs - a comma-separated list of directory names that will be ignored and not uploaded to S3. num_cb - The number of progress callbacks to display. The default is zero which means no callbacks. If you supplied a value of "-c 10" for example, the progress callback would be called 10 times for each file transferred. prefix - A file path prefix that will be stripped from the full path of the file when determining the key name in S3. For example, if the full path of a file is: /home/foo/bar/fie.baz and the prefix is specified as "-p /home/foo/" the resulting key name in S3 will be: /bar/fie.baz The prefix must end in a trailing separator and if it does not then one will be added. grant - A canned ACL policy that will be granted on each file transferred to S3. The value of provided must be one of the "canned" ACL policies supported by S3: private|public-read|public-read-write|authenticated-read no_overwrite - No files will be overwritten on S3, if the file/key exists on s3 it will be kept. This is useful for resuming interrupted transfers. Note this is not a sync, even if the file has been updated locally if the key exists on s3 the file on s3 will not be updated. reduced - Use Reduced Redundancy storage If the -n option is provided, no files will be transferred to S3 but informational messages will be printed about what would happen. """ def usage(): print usage_string sys.exit() def submit_cb(bytes_so_far, total_bytes): print '%d bytes transferred / %d bytes total' % (bytes_so_far, total_bytes) def get_key_name(fullpath, prefix): key_name = fullpath[len(prefix):] l = key_name.split(os.sep) return '/'.join(l) def main(): try: opts, args = getopt.getopt( sys.argv[1:], 'a:b:c::d:g:hi:np:qs:vwr', ['access_key', 'bucket', 'callback', 'debug', 'help', 'grant', 'ignore', 'no_op', 'prefix', 'quiet', 'secret_key', 'no_overwrite', 'reduced'] ) except: usage() ignore_dirs = [] aws_access_key_id = None aws_secret_access_key = None bucket_name = '' total = 0 debug = 0 cb = None num_cb = 0 quiet = False no_op = False prefix = '/' grant = None no_overwrite = False reduced = False for o, a in opts: if o in ('-h', '--help'): usage() sys.exit() if o in ('-a', '--access_key'): aws_access_key_id = a if o in ('-b', '--bucket'): bucket_name = a if o in ('-c', '--callback'): num_cb = int(a) cb = submit_cb if o in ('-d', '--debug'): debug = int(a) if o in ('-g', '--grant'): grant = a if o in ('-i', '--ignore'): ignore_dirs = a.split(',') if o in ('-n', '--no_op'): no_op = True if o in ('-w', '--no_overwrite'): no_overwrite = True if o in ('-r', '--reduced'): reduced = True if o in ('-p', '--prefix'): prefix = a if prefix[-1] != os.sep: prefix = prefix + os.sep if o in ('-q', '--quiet'): quiet = True if o in ('-s', '--secret_key'): aws_secret_access_key = a if len(args) != 1: print usage() path = os.path.expanduser(args[0]) path = os.path.expandvars(path) path = os.path.abspath(path) if bucket_name: c = boto.connect_s3(aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key) c.debug = debug b = c.get_bucket(bucket_name) if os.path.isdir(path): if no_overwrite: if not quiet: print 'Getting list of existing keys to check against' keys = [] for key in b.list(): keys.append(key.name) for root, dirs, files in os.walk(path): for ignore in ignore_dirs: if ignore in dirs: dirs.remove(ignore) for file in files: fullpath = os.path.join(root, file) key_name = get_key_name(fullpath, prefix) copy_file = True if no_overwrite: if key_name in keys: copy_file = False if not quiet: print 'Skipping %s as it exists in s3' % file if copy_file: if not quiet: print 'Copying %s to %s/%s' % (file, bucket_name, key_name) if not no_op: k = b.new_key(key_name) k.set_contents_from_filename( fullpath, cb=cb, num_cb=num_cb, policy=grant, reduced_redundancy=reduced, ) total += 1 elif os.path.isfile(path): key_name = os.path.split(path)[1] copy_file = True if no_overwrite: if b.get_key(key_name): copy_file = False if not quiet: print 'Skipping %s as it exists in s3' % path if copy_file: k = b.new_key(key_name) k.set_contents_from_filename(path, cb=cb, num_cb=num_cb, policy=grant, reduced_redundancy=reduced) else: print usage() if __name__ == "__main__": main() ================================================ FILE: deploy/third_party/boto-2.1.1/bin/sdbadmin ================================================ #!/usr/bin/env python # Copyright (c) 2009 Chris Moyer http://kopertop.blogspot.com/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # # Tools to dump and recover an SDB domain # VERSION = "%prog version 1.0" import boto import time from boto import sdb def choice_input(options, default=None, title=None): """ Choice input """ if title == None: title = "Please choose" print title objects = [] for n, obj in enumerate(options): print "%s: %s" % (n, obj) objects.append(obj) choice = int(raw_input(">>> ")) try: choice = objects[choice] except: choice = default return choice def confirm(message="Are you sure?"): choice = raw_input("%s [yN] " % message) return choice and len(choice) > 0 and choice[0].lower() == "y" def dump_db(domain, file_name): """ Dump SDB domain to file """ doc = domain.to_xml(open(file_name, "w")) def empty_db(domain): """ Remove all entries from domain """ for item in domain: item.delete() def load_db(domain, file): """ Load a domain from a file, this doesn't overwrite any existing data in the file so if you want to do a full recovery and restore you need to call empty_db before calling this :param domain: The SDB Domain object to load to :param file: The File to load the DB from """ domain.from_xml(file) def create_db(domain_name, region_name): """Create a new DB :param domain: Name of the domain to create :type domain: str """ sdb = boto.sdb.connect_to_region(region_name) return sdb.create_domain(domain_name) if __name__ == "__main__": from optparse import OptionParser parser = OptionParser(version=VERSION, usage="Usage: %prog [--dump|--load|--empty|--list|-l] [options]") # Commands parser.add_option("--dump", help="Dump domain to file", dest="dump", default=False, action="store_true") parser.add_option("--load", help="Load domain contents from file", dest="load", default=False, action="store_true") parser.add_option("--empty", help="Empty all contents of domain", dest="empty", default=False, action="store_true") parser.add_option("-l", "--list", help="List All domains", dest="list", default=False, action="store_true") parser.add_option("-c", "--create", help="Create domain", dest="create", default=False, action="store_true") parser.add_option("-a", "--all-domains", help="Operate on all domains", action="store_true", default=False, dest="all_domains") parser.add_option("-d", "--domain", help="Do functions on domain (may be more then one)", action="append", dest="domains") parser.add_option("-f", "--file", help="Input/Output file we're operating on", dest="file_name") parser.add_option("-r", "--region", help="Region (e.g. us-east-1[default] or eu-west-1)", default="us-east-1", dest="region_name") (options, args) = parser.parse_args() if options.create: for domain_name in options.domains: create_db(domain_name, options.region_name) exit() sdb = boto.sdb.connect_to_region(options.region_name) if options.list: for db in sdb.get_all_domains(): print db exit() if not options.dump and not options.load and not options.empty: parser.print_help() exit() # # Setup # if options.domains: domains = [] for domain_name in options.domains: domains.append(sdb.get_domain(domain_name)) elif options.all_domains: domains = sdb.get_all_domains() else: domains = [choice_input(options=sdb.get_all_domains(), title="No domain specified, please choose one")] # # Execute the commands # stime = time.time() if options.empty: if confirm("WARNING!!! Are you sure you want to empty the following domains?: %s" % domains): stime = time.time() for domain in domains: print "--------> Emptying %s <--------" % domain.name empty_db(domain) else: print "Canceling operations" exit() if options.dump: for domain in domains: print "--------> Dumping %s <---------" % domain.name if options.file_name: file_name = options.file_name else: file_name = "%s.db" % domain.name dump_db(domain, file_name) if options.load: for domain in domains: print "---------> Loading %s <----------" % domain.name if options.file_name: file_name = options.file_name else: file_name = "%s.db" % domain.name load_db(domain, open(file_name, "rb")) total_time = round(time.time() - stime, 2) print "--------> Finished in %s <--------" % total_time ================================================ FILE: deploy/third_party/boto-2.1.1/bin/taskadmin ================================================ #!/usr/bin/env python # Copyright (c) 2009 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # # Task/Job Administration utility # VERSION="0.1" __version__ = VERSION usage = """%prog [options] [command] Commands: list|ls List all Tasks in SDB delete Delete Task with id get Get Task create|mk Create a new Task with command running every """ def list(): """List all Tasks in SDB""" from boto.manage.task import Task print "%-8s %-40s %s" % ("Hour", "Name", "Command") print "-"*100 for t in Task.all(): print "%-8s %-40s %s" % (t.hour, t.name, t.command) def get(name): """Get a task :param name: The name of the task to fetch :type name: str """ from boto.manage.task import Task q = Task.find() q.filter("name like", "%s%%" % name) for t in q: print "="*80 print "| ", t.id print "|%s" % ("-"*79) print "| Name: ", t.name print "| Hour: ", t.hour print "| Command: ", t.command if t.last_executed: print "| Last Run: ", t.last_executed.ctime() print "| Last Status: ", t.last_status print "| Last Run Log: ", t.last_output print "="*80 def delete(id): from boto.manage.task import Task t = Task.get_by_id(id) print "Deleting task: %s" % t.name if raw_input("Are you sure? ").lower() in ["y", "yes"]: t.delete() print "Deleted" else: print "Canceled" def create(name, hour, command): """Create a new task :param name: Name of the task to create :type name: str :param hour: What hour to run it at, "*" for every hour :type hour: str :param command: The command to execute :type command: str """ from boto.manage.task import Task t = Task() t.name = name t.hour = hour t.command = command t.put() print "Created task: %s" % t.id if __name__ == "__main__": try: import readline except ImportError: pass import boto import sys from optparse import OptionParser from boto.mashups.iobject import IObject parser = OptionParser(version=__version__, usage=usage) (options, args) = parser.parse_args() if len(args) < 1: parser.print_help() sys.exit(1) command = args[0].lower() if command in ("ls", "list"): list() elif command == "get": get(args[1]) elif command == "create": create(args[1], args[2], args[3]) elif command == "delete": delete(args[1]) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/__init__.py ================================================ # Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010-2011, Eucalyptus Systems, Inc. # Copyright (c) 2011, Nexenta Systems Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # from boto.pyami.config import Config, BotoConfigLocations from boto.storage_uri import BucketStorageUri, FileStorageUri import boto.plugin import os, re, sys import logging import logging.config from boto.exception import InvalidUriError __version__ = '2.1.1' Version = __version__ # for backware compatibility UserAgent = 'Boto/%s (%s)' % (__version__, sys.platform) config = Config() def init_logging(): for file in BotoConfigLocations: try: logging.config.fileConfig(os.path.expanduser(file)) except: pass class NullHandler(logging.Handler): def emit(self, record): pass log = logging.getLogger('boto') log.addHandler(NullHandler()) init_logging() # convenience function to set logging to a particular file def set_file_logger(name, filepath, level=logging.INFO, format_string=None): global log if not format_string: format_string = "%(asctime)s %(name)s [%(levelname)s]:%(message)s" logger = logging.getLogger(name) logger.setLevel(level) fh = logging.FileHandler(filepath) fh.setLevel(level) formatter = logging.Formatter(format_string) fh.setFormatter(formatter) logger.addHandler(fh) log = logger def set_stream_logger(name, level=logging.DEBUG, format_string=None): global log if not format_string: format_string = "%(asctime)s %(name)s [%(levelname)s]:%(message)s" logger = logging.getLogger(name) logger.setLevel(level) fh = logging.StreamHandler() fh.setLevel(level) formatter = logging.Formatter(format_string) fh.setFormatter(formatter) logger.addHandler(fh) log = logger def connect_sqs(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.sqs.connection.SQSConnection` :return: A connection to Amazon's SQS """ from boto.sqs.connection import SQSConnection return SQSConnection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_s3(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.s3.connection.S3Connection` :return: A connection to Amazon's S3 """ from boto.s3.connection import S3Connection return S3Connection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_gs(gs_access_key_id=None, gs_secret_access_key=None, **kwargs): """ @type gs_access_key_id: string @param gs_access_key_id: Your Google Cloud Storage Access Key ID @type gs_secret_access_key: string @param gs_secret_access_key: Your Google Cloud Storage Secret Access Key @rtype: L{GSConnection} @return: A connection to Google's Storage service """ from boto.gs.connection import GSConnection return GSConnection(gs_access_key_id, gs_secret_access_key, **kwargs) def connect_ec2(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.ec2.connection.EC2Connection` :return: A connection to Amazon's EC2 """ from boto.ec2.connection import EC2Connection return EC2Connection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_elb(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.ec2.elb.ELBConnection` :return: A connection to Amazon's Load Balancing Service """ from boto.ec2.elb import ELBConnection return ELBConnection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_autoscale(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.ec2.autoscale.AutoScaleConnection` :return: A connection to Amazon's Auto Scaling Service """ from boto.ec2.autoscale import AutoScaleConnection return AutoScaleConnection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_cloudwatch(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.ec2.cloudwatch.CloudWatchConnection` :return: A connection to Amazon's EC2 Monitoring service """ from boto.ec2.cloudwatch import CloudWatchConnection return CloudWatchConnection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_sdb(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.sdb.connection.SDBConnection` :return: A connection to Amazon's SDB """ from boto.sdb.connection import SDBConnection return SDBConnection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_fps(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.fps.connection.FPSConnection` :return: A connection to FPS """ from boto.fps.connection import FPSConnection return FPSConnection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_mturk(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.mturk.connection.MTurkConnection` :return: A connection to MTurk """ from boto.mturk.connection import MTurkConnection return MTurkConnection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_cloudfront(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.fps.connection.FPSConnection` :return: A connection to FPS """ from boto.cloudfront import CloudFrontConnection return CloudFrontConnection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_vpc(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.vpc.VPCConnection` :return: A connection to VPC """ from boto.vpc import VPCConnection return VPCConnection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_rds(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.rds.RDSConnection` :return: A connection to RDS """ from boto.rds import RDSConnection return RDSConnection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_emr(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.emr.EmrConnection` :return: A connection to Elastic mapreduce """ from boto.emr import EmrConnection return EmrConnection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_sns(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.sns.SNSConnection` :return: A connection to Amazon's SNS """ from boto.sns import SNSConnection return SNSConnection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_iam(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.iam.IAMConnection` :return: A connection to Amazon's IAM """ from boto.iam import IAMConnection return IAMConnection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_route53(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.dns.Route53Connection` :return: A connection to Amazon's Route53 DNS Service """ from boto.route53 import Route53Connection return Route53Connection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_euca(host=None, aws_access_key_id=None, aws_secret_access_key=None, port=8773, path='/services/Eucalyptus', is_secure=False, **kwargs): """ Connect to a Eucalyptus service. :type host: string :param host: the host name or ip address of the Eucalyptus server :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.ec2.connection.EC2Connection` :return: A connection to Eucalyptus server """ from boto.ec2 import EC2Connection from boto.ec2.regioninfo import RegionInfo # Check for values in boto config, if not supplied as args if not aws_access_key_id: aws_access_key_id = config.get('Credentials', 'euca_access_key_id', None) if not aws_secret_access_key: aws_secret_access_key = config.get('Credentials', 'euca_secret_access_key', None) if not host: host = config.get('Boto', 'eucalyptus_host', None) reg = RegionInfo(name='eucalyptus', endpoint=host) return EC2Connection(aws_access_key_id, aws_secret_access_key, region=reg, port=port, path=path, is_secure=is_secure, **kwargs) def connect_walrus(host=None, aws_access_key_id=None, aws_secret_access_key=None, port=8773, path='/services/Walrus', is_secure=False, **kwargs): """ Connect to a Walrus service. :type host: string :param host: the host name or ip address of the Walrus server :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.s3.connection.S3Connection` :return: A connection to Walrus """ from boto.s3.connection import S3Connection from boto.s3.connection import OrdinaryCallingFormat # Check for values in boto config, if not supplied as args if not aws_access_key_id: aws_access_key_id = config.get('Credentials', 'euca_access_key_id', None) if not aws_secret_access_key: aws_secret_access_key = config.get('Credentials', 'euca_secret_access_key', None) if not host: host = config.get('Boto', 'walrus_host', None) return S3Connection(aws_access_key_id, aws_secret_access_key, host=host, port=port, path=path, calling_format=OrdinaryCallingFormat(), is_secure=is_secure, **kwargs) def connect_ses(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.ses.SESConnection` :return: A connection to Amazon's SES """ from boto.ses import SESConnection return SESConnection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_sts(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): """ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.sts.STSConnection` :return: A connection to Amazon's STS """ from boto.sts import STSConnection return STSConnection(aws_access_key_id, aws_secret_access_key, **kwargs) def connect_ia(ia_access_key_id=None, ia_secret_access_key=None, is_secure=False, **kwargs): """ Connect to the Internet Archive via their S3-like API. :type ia_access_key_id: string :param ia_access_key_id: Your IA Access Key ID. This will also look in your boto config file for an entry in the Credentials section called "ia_access_key_id" :type ia_secret_access_key: string :param ia_secret_access_key: Your IA Secret Access Key. This will also look in your boto config file for an entry in the Credentials section called "ia_secret_access_key" :rtype: :class:`boto.s3.connection.S3Connection` :return: A connection to the Internet Archive """ from boto.s3.connection import S3Connection from boto.s3.connection import OrdinaryCallingFormat access_key = config.get('Credentials', 'ia_access_key_id', ia_access_key_id) secret_key = config.get('Credentials', 'ia_secret_access_key', ia_secret_access_key) return S3Connection(access_key, secret_key, host='s3.us.archive.org', calling_format=OrdinaryCallingFormat(), is_secure=is_secure, **kwargs) def check_extensions(module_name, module_path): """ This function checks for extensions to boto modules. It should be called in the __init__.py file of all boto modules. See: http://code.google.com/p/boto/wiki/ExtendModules for details. """ option_name = '%s_extend' % module_name version = config.get('Boto', option_name, None) if version: dirname = module_path[0] path = os.path.join(dirname, version) if os.path.isdir(path): log.info('extending module %s with: %s' % (module_name, path)) module_path.insert(0, path) _aws_cache = {} def _get_aws_conn(service): global _aws_cache conn = _aws_cache.get(service) if not conn: meth = getattr(sys.modules[__name__], 'connect_' + service) conn = meth() _aws_cache[service] = conn return conn def lookup(service, name): global _aws_cache conn = _get_aws_conn(service) obj = _aws_cache.get('.'.join((service, name)), None) if not obj: obj = conn.lookup(name) _aws_cache['.'.join((service, name))] = obj return obj def storage_uri(uri_str, default_scheme='file', debug=0, validate=True, bucket_storage_uri_class=BucketStorageUri): """ Instantiate a StorageUri from a URI string. :type uri_str: string :param uri_str: URI naming bucket + optional object. :type default_scheme: string :param default_scheme: default scheme for scheme-less URIs. :type debug: int :param debug: debug level to pass in to boto connection (range 0..2). :type validate: bool :param validate: whether to check for bucket name validity. :type bucket_storage_uri_class: BucketStorageUri interface. :param bucket_storage_uri_class: Allows mocking for unit tests. We allow validate to be disabled to allow caller to implement bucket-level wildcarding (outside the boto library; see gsutil). :rtype: :class:`boto.StorageUri` subclass :return: StorageUri subclass for given URI. ``uri_str`` must be one of the following formats: * gs://bucket/name * s3://bucket/name * gs://bucket * s3://bucket * filename The last example uses the default scheme ('file', unless overridden) """ # Manually parse URI components instead of using urlparse.urlparse because # what we're calling URIs don't really fit the standard syntax for URIs # (the latter includes an optional host/net location part). end_scheme_idx = uri_str.find('://') if end_scheme_idx == -1: # Check for common error: user specifies gs:bucket instead # of gs://bucket. Some URI parsers allow this, but it can cause # confusion for callers, so we don't. if uri_str.find(':') != -1: raise InvalidUriError('"%s" contains ":" instead of "://"' % uri_str) scheme = default_scheme.lower() path = uri_str else: scheme = uri_str[0:end_scheme_idx].lower() path = uri_str[end_scheme_idx + 3:] if scheme not in ['file', 's3', 'gs']: raise InvalidUriError('Unrecognized scheme "%s"' % scheme) if scheme == 'file': # For file URIs we have no bucket name, and use the complete path # (minus 'file://') as the object name. is_stream = False if path == '-': is_stream = True return FileStorageUri(path, debug, is_stream) else: path_parts = path.split('/', 1) bucket_name = path_parts[0] if (validate and bucket_name and # Disallow buckets violating charset or not [3..255] chars total. (not re.match('^[a-z0-9][a-z0-9\._-]{1,253}[a-z0-9]$', bucket_name) # Disallow buckets with individual DNS labels longer than 63. or re.search('[-_a-z0-9]{64}', bucket_name))): raise InvalidUriError('Invalid bucket name in URI "%s"' % uri_str) # If enabled, ensure the bucket name is valid, to avoid possibly # confusing other parts of the code. (For example if we didn't # catch bucket names containing ':', when a user tried to connect to # the server with that name they might get a confusing error about # non-integer port numbers.) object_name = '' if len(path_parts) > 1: object_name = path_parts[1] return bucket_storage_uri_class(scheme, bucket_name, object_name, debug) def storage_uri_for_key(key): """Returns a StorageUri for the given key. :type key: :class:`boto.s3.key.Key` or subclass :param key: URI naming bucket + optional object. """ if not isinstance(key, boto.s3.key.Key): raise InvalidUriError('Requested key (%s) is not a subclass of ' 'boto.s3.key.Key' % str(type(key))) prov_name = key.bucket.connection.provider.get_provider_name() uri_str = '%s://%s/%s' % (prov_name, key.bucket.name, key.name) return storage_uri(uri_str) boto.plugin.load_plugins(config) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/auth.py ================================================ # Copyright 2010 Google Inc. # Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Handles authentication required to AWS and GS """ import base64 import boto import boto.auth_handler import boto.exception import boto.plugin import boto.utils import hmac import sys import urllib from email.utils import formatdate from boto.auth_handler import AuthHandler from boto.exception import BotoClientError # # the following is necessary because of the incompatibilities # between Python 2.4, 2.5, and 2.6 as well as the fact that some # people running 2.4 have installed hashlib as a separate module # this fix was provided by boto user mccormix. # see: http://code.google.com/p/boto/issues/detail?id=172 # for more details. # try: from hashlib import sha1 as sha from hashlib import sha256 as sha256 if sys.version[:3] == "2.4": # we are using an hmac that expects a .new() method. class Faker: def __init__(self, which): self.which = which self.digest_size = self.which().digest_size def new(self, *args, **kwargs): return self.which(*args, **kwargs) sha = Faker(sha) sha256 = Faker(sha256) except ImportError: import sha sha256 = None class HmacKeys(object): """Key based Auth handler helper.""" def __init__(self, host, config, provider): if provider.access_key is None or provider.secret_key is None: raise boto.auth_handler.NotReadyToAuthenticate() self._provider = provider self._hmac = hmac.new(self._provider.secret_key, digestmod=sha) if sha256: self._hmac_256 = hmac.new(self._provider.secret_key, digestmod=sha256) else: self._hmac_256 = None def algorithm(self): if self._hmac_256: return 'HmacSHA256' else: return 'HmacSHA1' def sign_string(self, string_to_sign): boto.log.debug('Canonical: %s' % string_to_sign) if self._hmac_256: hmac = self._hmac_256.copy() else: hmac = self._hmac.copy() hmac.update(string_to_sign) return base64.encodestring(hmac.digest()).strip() class HmacAuthV1Handler(AuthHandler, HmacKeys): """ Implements the HMAC request signing used by S3 and GS.""" capability = ['hmac-v1', 's3'] def __init__(self, host, config, provider): AuthHandler.__init__(self, host, config, provider) HmacKeys.__init__(self, host, config, provider) self._hmac_256 = None def add_auth(self, http_request, **kwargs): headers = http_request.headers method = http_request.method auth_path = http_request.auth_path if not headers.has_key('Date'): headers['Date'] = formatdate(usegmt=True) if self._provider.security_token: key = self._provider.security_token_header headers[key] = self._provider.security_token c_string = boto.utils.canonical_string(method, auth_path, headers, None, self._provider) b64_hmac = self.sign_string(c_string) auth_hdr = self._provider.auth_header headers['Authorization'] = ("%s %s:%s" % (auth_hdr, self._provider.access_key, b64_hmac)) class HmacAuthV2Handler(AuthHandler, HmacKeys): """ Implements the simplified HMAC authorization used by CloudFront. """ capability = ['hmac-v2', 'cloudfront'] def __init__(self, host, config, provider): AuthHandler.__init__(self, host, config, provider) HmacKeys.__init__(self, host, config, provider) self._hmac_256 = None def add_auth(self, http_request, **kwargs): headers = http_request.headers if not headers.has_key('Date'): headers['Date'] = formatdate(usegmt=True) b64_hmac = self.sign_string(headers['Date']) auth_hdr = self._provider.auth_header headers['Authorization'] = ("%s %s:%s" % (auth_hdr, self._provider.access_key, b64_hmac)) class HmacAuthV3Handler(AuthHandler, HmacKeys): """Implements the new Version 3 HMAC authorization used by Route53.""" capability = ['hmac-v3', 'route53', 'ses'] def __init__(self, host, config, provider): AuthHandler.__init__(self, host, config, provider) HmacKeys.__init__(self, host, config, provider) def add_auth(self, http_request, **kwargs): headers = http_request.headers if not headers.has_key('Date'): headers['Date'] = formatdate(usegmt=True) b64_hmac = self.sign_string(headers['Date']) s = "AWS3-HTTPS AWSAccessKeyId=%s," % self._provider.access_key s += "Algorithm=%s,Signature=%s" % (self.algorithm(), b64_hmac) headers['X-Amzn-Authorization'] = s class QuerySignatureHelper(HmacKeys): """Helper for Query signature based Auth handler. Concrete sub class need to implement _calc_sigature method. """ def add_auth(self, http_request, **kwargs): headers = http_request.headers params = http_request.params params['AWSAccessKeyId'] = self._provider.access_key params['SignatureVersion'] = self.SignatureVersion params['Timestamp'] = boto.utils.get_ts() qs, signature = self._calc_signature( http_request.params, http_request.method, http_request.auth_path, http_request.host) boto.log.debug('query_string: %s Signature: %s' % (qs, signature)) if http_request.method == 'POST': headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8' http_request.body = qs + '&Signature=' + urllib.quote(signature) http_request.headers['Content-Length'] = str(len(http_request.body)) else: http_request.body = '' # if this is a retried request, the qs from the previous try will # already be there, we need to get rid of that and rebuild it http_request.path = http_request.path.split('?')[0] http_request.path = (http_request.path + '?' + qs + '&Signature=' + urllib.quote(signature)) class QuerySignatureV0AuthHandler(QuerySignatureHelper, AuthHandler): """Provides Signature V0 Signing""" SignatureVersion = 0 capability = ['sign-v0'] def _calc_signature(self, params, *args): boto.log.debug('using _calc_signature_0') hmac = self._hmac.copy() s = params['Action'] + params['Timestamp'] hmac.update(s) keys = params.keys() keys.sort(cmp = lambda x, y: cmp(x.lower(), y.lower())) pairs = [] for key in keys: val = boto.utils.get_utf8_value(params[key]) pairs.append(key + '=' + urllib.quote(val)) qs = '&'.join(pairs) return (qs, base64.b64encode(hmac.digest())) class QuerySignatureV1AuthHandler(QuerySignatureHelper, AuthHandler): """ Provides Query Signature V1 Authentication. """ SignatureVersion = 1 capability = ['sign-v1', 'mturk'] def _calc_signature(self, params, *args): boto.log.debug('using _calc_signature_1') hmac = self._hmac.copy() keys = params.keys() keys.sort(cmp = lambda x, y: cmp(x.lower(), y.lower())) pairs = [] for key in keys: hmac.update(key) val = boto.utils.get_utf8_value(params[key]) hmac.update(val) pairs.append(key + '=' + urllib.quote(val)) qs = '&'.join(pairs) return (qs, base64.b64encode(hmac.digest())) class QuerySignatureV2AuthHandler(QuerySignatureHelper, AuthHandler): """Provides Query Signature V2 Authentication.""" SignatureVersion = 2 capability = ['sign-v2', 'ec2', 'ec2', 'emr', 'fps', 'ecs', 'sdb', 'iam', 'rds', 'sns', 'sqs', 'cloudformation'] def _calc_signature(self, params, verb, path, server_name): boto.log.debug('using _calc_signature_2') string_to_sign = '%s\n%s\n%s\n' % (verb, server_name.lower(), path) if self._hmac_256: hmac = self._hmac_256.copy() params['SignatureMethod'] = 'HmacSHA256' else: hmac = self._hmac.copy() params['SignatureMethod'] = 'HmacSHA1' if self._provider.security_token: params['SecurityToken'] = self._provider.security_token keys = params.keys() keys.sort() pairs = [] for key in keys: val = boto.utils.get_utf8_value(params[key]) pairs.append(urllib.quote(key, safe='') + '=' + urllib.quote(val, safe='-_~')) qs = '&'.join(pairs) boto.log.debug('query string: %s' % qs) string_to_sign += qs boto.log.debug('string_to_sign: %s' % string_to_sign) hmac.update(string_to_sign) b64 = base64.b64encode(hmac.digest()) boto.log.debug('len(b64)=%d' % len(b64)) boto.log.debug('base64 encoded digest: %s' % b64) return (qs, b64) def get_auth_handler(host, config, provider, requested_capability=None): """Finds an AuthHandler that is ready to authenticate. Lists through all the registered AuthHandlers to find one that is willing to handle for the requested capabilities, config and provider. :type host: string :param host: The name of the host :type config: :param config: :type provider: :param provider: Returns: An implementation of AuthHandler. Raises: boto.exception.NoAuthHandlerFound: boto.exception.TooManyAuthHandlerReadyToAuthenticate: """ ready_handlers = [] auth_handlers = boto.plugin.get_plugin(AuthHandler, requested_capability) total_handlers = len(auth_handlers) for handler in auth_handlers: try: ready_handlers.append(handler(host, config, provider)) except boto.auth_handler.NotReadyToAuthenticate: pass if not ready_handlers: checked_handlers = auth_handlers names = [handler.__name__ for handler in checked_handlers] raise boto.exception.NoAuthHandlerFound( 'No handler was ready to authenticate. %d handlers were checked.' ' %s ' 'Check your credentials' % (len(names), str(names))) if len(ready_handlers) > 1: # NOTE: Even though it would be nice to accept more than one handler # by using one of the many ready handlers, we are never sure that each # of them are referring to the same storage account. Since we cannot # easily guarantee that, it is always safe to fail, rather than operate # on the wrong account. names = [handler.__class__.__name__ for handler in ready_handlers] raise boto.exception.TooManyAuthHandlerReadyToAuthenticate( '%d AuthHandlers %s ready to authenticate for requested_capability ' '%s, only 1 expected. This happens if you import multiple ' 'pluging.Plugin implementations that declare support for the ' 'requested_capability.' % (len(names), str(names), requested_capability)) return ready_handlers[0] ================================================ FILE: deploy/third_party/boto-2.1.1/boto/auth_handler.py ================================================ # Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Defines an interface which all Auth handlers need to implement. """ from plugin import Plugin class NotReadyToAuthenticate(Exception): pass class AuthHandler(Plugin): capability = [] def __init__(self, host, config, provider): """Constructs the handlers. :type host: string :param host: The host to which the request is being sent. :type config: boto.pyami.Config :param config: Boto configuration. :type provider: boto.provider.Provider :param provider: Provider details. Raises: NotReadyToAuthenticate: if this handler is not willing to authenticate for the given provider and config. """ pass def add_auth(self, http_request): """Invoked to add authentication details to request. :type http_request: boto.connection.HTTPRequest :param http_request: HTTP request that needs to be authenticated. """ pass ================================================ FILE: deploy/third_party/boto-2.1.1/boto/cacerts/__init__.py ================================================ # Copyright 2010 Google Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # ================================================ FILE: deploy/third_party/boto-2.1.1/boto/cacerts/cacerts.txt ================================================ # Certifcate Authority certificates for validating SSL connections. # # This file contains PEM format certificates generated from # http://mxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtins/certdata.txt # # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License # for the specific language governing rights and limitations under the # License. # # The Original Code is the Netscape security libraries. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1994-2000 # the Initial Developer. All Rights Reserved. # # Contributor(s): # # Alternatively, the contents of this file may be used under the terms of # either the GNU General Public License Version 2 or later (the "GPL"), or # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), # in which case the provisions of the GPL or the LGPL are applicable instead # of those above. If you wish to allow use of your version of this file only # under the terms of either the GPL or the LGPL, and not to allow others to # use your version of this file under the terms of the MPL, indicate your # decision by deleting the provisions above and replace them with the notice # and other provisions required by the GPL or the LGPL. If you do not delete # the provisions above, a recipient may use your version of this file under # the terms of any one of the MPL, the GPL or the LGPL. # # ***** END LICENSE BLOCK ***** Verisign/RSA Secure Server CA ============================= -----BEGIN CERTIFICATE----- MIICNDCCAaECEAKtZn5ORf5eV288mBle3cAwDQYJKoZIhvcNAQECBQAwXzELMAkG A1UEBhMCVVMxIDAeBgNVBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYD VQQLEyVTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk0 MTEwOTAwMDAwMFoXDTEwMDEwNzIzNTk1OVowXzELMAkGA1UEBhMCVVMxIDAeBgNV BAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2Vy dmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGbMA0GCSqGSIb3DQEBAQUAA4GJ ADCBhQJ+AJLOesGugz5aqomDV6wlAXYMra6OLDfO6zV4ZFQD5YRAUcm/jwjiioII 0haGN1XpsSECrXZogZoFokvJSyVmIlZsiAeP94FZbYQHZXATcXY+m3dM41CJVphI uR2nKRoTLkoRWZweFdVJVCxzOmmCsZc5nG1wZ0jl3S3WyB57AgMBAAEwDQYJKoZI hvcNAQECBQADfgBl3X7hsuyw4jrg7HFGmhkRuNPHoLQDQCYCPgmc4RKz0Vr2N6W3 YQO2WxZpO8ZECAyIUwxrl0nHPjXcbLm7qt9cuzovk2C2qUtN8iD3zV9/ZHuO3ABc 1/p3yjkWWW8O6tO1g39NTUJWdrTJXwT4OPjr0l91X817/OWOgHz8UA== -----END CERTIFICATE----- Thawte Personal Basic CA ======================== -----BEGIN CERTIFICATE----- MIIDITCCAoqgAwIBAgIBADANBgkqhkiG9w0BAQQFADCByzELMAkGA1UEBhMCWkEx FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT ZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFBlcnNvbmFsIEJhc2lj IENBMSgwJgYJKoZIhvcNAQkBFhlwZXJzb25hbC1iYXNpY0B0aGF3dGUuY29tMB4X DTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgcsxCzAJBgNVBAYTAlpBMRUw EwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEaMBgGA1UE ChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2Vy dmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQZXJzb25hbCBCYXNpYyBD QTEoMCYGCSqGSIb3DQEJARYZcGVyc29uYWwtYmFzaWNAdGhhd3RlLmNvbTCBnzAN BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvLyTU23AUE+CFeZIlDWmWr5vQvoPR+53 dXLdjUmbllegeNTKP1GzaQuRdhciB5dqxFGTS+CN7zeVoQxN2jSQHReJl+A1OFdK wPQIcOk8RHtQfmGakOMj04gRRif1CwcOu93RfyAKiLlWCy4cgNrx454p7xS9CkT7 G1sY0b8jkyECAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQF AAOBgQAt4plrsD16iddZopQBHyvdEktTwq1/qqcAXJFAVyVKOKqEcLnZgA+le1z7 c8a914phXAPjLSeoF+CEhULcXpvGt7Jtu3Sv5D/Lp7ew4F2+eIMllNLbgQ95B21P 9DkVWlIBe94y1k049hJcBlDfBVu9FEuh3ym6O0GN92NWod8isQ== -----END CERTIFICATE----- Thawte Personal Premium CA ========================== -----BEGIN CERTIFICATE----- MIIDKTCCApKgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBzzELMAkGA1UEBhMCWkEx FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT ZXJ2aWNlcyBEaXZpc2lvbjEjMCEGA1UEAxMaVGhhd3RlIFBlcnNvbmFsIFByZW1p dW0gQ0ExKjAoBgkqhkiG9w0BCQEWG3BlcnNvbmFsLXByZW1pdW1AdGhhd3RlLmNv bTAeFw05NjAxMDEwMDAwMDBaFw0yMDEyMzEyMzU5NTlaMIHPMQswCQYDVQQGEwJa QTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xGjAY BgNVBAoTEVRoYXd0ZSBDb25zdWx0aW5nMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9u IFNlcnZpY2VzIERpdmlzaW9uMSMwIQYDVQQDExpUaGF3dGUgUGVyc29uYWwgUHJl bWl1bSBDQTEqMCgGCSqGSIb3DQEJARYbcGVyc29uYWwtcHJlbWl1bUB0aGF3dGUu Y29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJZtn4B0TPuYwu8KHvE0Vs Bd/eJxZRNkERbGw77f4QfRKe5ZtCmv5gMcNmt3M6SK5O0DI3lIi1DbbZ8/JE2dWI Et12TfIa/G8jHnrx2JhFTgcQ7xZC0EN1bUre4qrJMf8fAHB8Zs8QJQi6+u4A6UYD ZicRFTuqW/KY3TZCstqIdQIDAQABoxMwETAPBgNVHRMBAf8EBTADAQH/MA0GCSqG SIb3DQEBBAUAA4GBAGk2ifc0KjNyL2071CKyuG+axTZmDhs8obF1Wub9NdP4qPIH b4Vnjt4rueIXsDqg8A6iAJrf8xQVbrvIhVqYgPn/vnQdPfP+MCXRNzRn+qVxeTBh KXLA4CxM+1bkOqhv5TJZUtt1KFBZDPgLGeSs2a+WjS9Q2wfD6h+rM+D1KzGJ -----END CERTIFICATE----- Thawte Personal Freemail CA =========================== -----BEGIN CERTIFICATE----- MIIDLTCCApagAwIBAgIBADANBgkqhkiG9w0BAQQFADCB0TELMAkGA1UEBhMCWkEx FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYD VQQKExFUaGF3dGUgQ29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBT ZXJ2aWNlcyBEaXZpc2lvbjEkMCIGA1UEAxMbVGhhd3RlIFBlcnNvbmFsIEZyZWVt YWlsIENBMSswKQYJKoZIhvcNAQkBFhxwZXJzb25hbC1mcmVlbWFpbEB0aGF3dGUu Y29tMB4XDTk2MDEwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgdExCzAJBgNVBAYT AlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEa MBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRp b24gU2VydmljZXMgRGl2aXNpb24xJDAiBgNVBAMTG1RoYXd0ZSBQZXJzb25hbCBG cmVlbWFpbCBDQTErMCkGCSqGSIb3DQEJARYccGVyc29uYWwtZnJlZW1haWxAdGhh d3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1GnX1LCUZFtx6UfY DFG26nKRsIRefS0Nj3sS34UldSh0OkIsYyeflXtL734Zhx2G6qPduc6WZBrCFG5E rHzmj+hND3EfQDimAKOHePb5lIZererAXnbr2RSjXW56fAylS1V/Bhkpf56aJtVq uzgkCGqYx7Hao5iR/Xnb5VrEHLkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zAN BgkqhkiG9w0BAQQFAAOBgQDH7JJ+Tvj1lqVnYiqk8E0RYNBvjWBYYawmu1I1XAjP MPuoSpaKH2JCI4wXD/S6ZJwXrEcp352YXtJsYHFcoqzceePnbgBHH7UNKOgCneSa /RP0ptl8sfjcXyMmCZGAc9AUG95DqYMl8uacLxXK/qarigd1iwzdUYRr5PjRznei gQ== -----END CERTIFICATE----- Thawte Server CA ================ -----BEGIN CERTIFICATE----- MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv biBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm MCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTYwODAx MDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3 dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNl cyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3 DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD gY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl/Kj0R1HahbUgdJSGHg91 yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg71CcEJRCX L+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGj EzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG 7oWDTSEwjsrZqG9JGubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6e QNuozDJ0uW8NxuOzRAvZim+aKZuZGCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZ qdq5snUb9kLy78fyGPmJvKP/iiMucEc= -----END CERTIFICATE----- Thawte Premium Server CA ======================== -----BEGIN CERTIFICATE----- MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG 9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg== -----END CERTIFICATE----- Equifax Secure CA ================= -----BEGIN CERTIFICATE----- MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1 MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y 7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh 1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4 -----END CERTIFICATE----- Verisign Class 1 Public Primary Certification Authority ======================================================= -----BEGIN CERTIFICATE----- MIICPTCCAaYCEQDNun9W8N/kvFT+IqyzcqpVMA0GCSqGSIb3DQEBAgUAMF8xCzAJ BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xh c3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05 NjAxMjkwMDAwMDBaFw0yODA4MDEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYD VQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMSBQdWJsaWMgUHJp bWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOB jQAwgYkCgYEA5Rm/baNWYS2ZSHH2Z965jeu3noaACpEO+jglr0aIguVzqKCbJF0N H8xlbgyw0FaEGIeaBpsQoXPftFg5a27B9hXVqKg/qhIGjTGsf7A01480Z4gJzRQR 4k5FVmkfeAKA2txHkSm7NsljXMXg1y2He6G3MrB7MLoqLzGq7qNn2tsCAwEAATAN BgkqhkiG9w0BAQIFAAOBgQBMP7iLxmjf7kMzDl3ppssHhE16M/+SG/Q2rdiVIjZo EWx8QszznC7EBz8UsA9P/5CSdvnivErpj82ggAr3xSnxgiJduLHdgSOjeyUVRjB5 FvjqBUuUfx3CHMjjt/QQQDwTw18fU+hI5Ia0e6E1sHslurjTjqs/OJ0ANACY89Fx lA== -----END CERTIFICATE----- Verisign Class 2 Public Primary Certification Authority ======================================================= -----BEGIN CERTIFICATE----- MIICPDCCAaUCEC0b/EoXjaOR6+f/9YtFvgswDQYJKoZIhvcNAQECBQAwXzELMAkG A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz cyAyIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2 MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAyIFB1YmxpYyBQcmlt YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN ADCBiQKBgQC2WoujDWojg4BrzzmH9CETMwZMJaLtVRKXxaeAufqDwSCg+i8VDXyh YGt+eSz6Bg86rvYbb7HS/y8oUl+DfUvEerf4Zh+AVPy3wo5ZShRXRtGak75BkQO7 FYCTXOvnzAhsPz6zSvz/S2wj1VCCJkQZjiPDceoZJEcEnnW/yKYAHwIDAQABMA0G CSqGSIb3DQEBAgUAA4GBAIobK/o5wXTXXtgZZKJYSi034DNHD6zt96rbHuSLBlxg J8pFUs4W7z8GZOeUaHxgMxURaa+dYo2jA1Rrpr7l7gUYYAS/QoD90KioHgE796Nc r6Pc5iaAIzy4RHT3Cq5Ji2F4zCS/iIqnDupzGUH9TQPwiNHleI2lKk/2lw0Xd8rY -----END CERTIFICATE----- Verisign Class 3 Public Primary Certification Authority ======================================================= -----BEGIN CERTIFICATE----- MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2 MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k -----END CERTIFICATE----- Verisign Class 1 Public Primary Certification Authority - G2 ============================================================ -----BEGIN CERTIFICATE----- MIIDAjCCAmsCEEzH6qqYPnHTkxD4PTqJkZIwDQYJKoZIhvcNAQEFBQAwgcExCzAJ BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh c3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMg UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5 MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB AQUAA4GNADCBiQKBgQCq0Lq+Fi24g9TK0g+8djHKlNgdk4xWArzZbxpvUjZudVYK VdPfQ4chEWWKfo+9Id5rMj8bhDSVBZ1BNeuS65bdqlk/AVNtmU/t5eIqWpDBucSm Fc/IReumXY6cPvBkJHalzasab7bYe1FhbqZ/h8jit+U03EGI6glAvnOSPWvndQID AQABMA0GCSqGSIb3DQEBBQUAA4GBAKlPww3HZ74sy9mozS11534Vnjty637rXC0J h9ZrbWB85a7FkCMMXErQr7Fd88e2CtvgFZMN3QO8x3aKtd1Pw5sTdbgBwObJW2ul uIncrKTdcu1OofdPvAbT6shkdHvClUGcZXNY8ZCaPGqxmMnEh7zPRW1F4m4iP/68 DzFc6PLZ -----END CERTIFICATE----- Verisign Class 2 Public Primary Certification Authority - G2 ============================================================ -----BEGIN CERTIFICATE----- MIIDAzCCAmwCEQC5L2DMiJ+hekYJuFtwbIqvMA0GCSqGSIb3DQEBBQUAMIHBMQsw CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0Ns YXNzIDIgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH MjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9y aXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazAe Fw05ODA1MTgwMDAwMDBaFw0yODA4MDEyMzU5NTlaMIHBMQswCQYDVQQGEwJVUzEX MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGlj IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMx KGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s eTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazCBnzANBgkqhkiG9w0B AQEFAAOBjQAwgYkCgYEAp4gBIXQs5xoD8JjhlzwPIQjxnNuX6Zr8wgQGE75fUsjM HiwSViy4AWkszJkfrbCWrnkE8hM5wXuYuggs6MKEEyyqaekJ9MepAqRCwiNPStjw DqL7MWzJ5m+ZJwf15vRMeJ5t60aG+rmGyVTyssSv1EYcWskVMP8NbPUtDm3Of3cC AwEAATANBgkqhkiG9w0BAQUFAAOBgQByLvl/0fFx+8Se9sVeUYpAmLho+Jscg9ji nb3/7aHmZuovCfTK1+qlK5X2JGCGTUQug6XELaDTrnhpb3LabK4I8GOSN+a7xDAX rXfMSTWqz9iP0b63GJZHc2pUIjRkLbYWm1lbtFFZOrMLFPQS32eg9K0yZF6xRnIn jBJ7xUS0rg== -----END CERTIFICATE----- Verisign Class 3 Public Primary Certification Authority - G2 ============================================================ -----BEGIN CERTIFICATE----- MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJ BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMg UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5 MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB AQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCOFoUgRm1HP9SFIIThbbP4 pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71lSk8UOg0 13gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwID AQABMA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSk U01UbSuvDV1Ai2TT1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7i F6YM40AIOw7n60RzKprxaZLvcRTDOaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpY oJ2daZH9 -----END CERTIFICATE----- Verisign Class 4 Public Primary Certification Authority - G2 ============================================================ -----BEGIN CERTIFICATE----- MIIDAjCCAmsCEDKIjprS9esTR/h/xCA3JfgwDQYJKoZIhvcNAQEFBQAwgcExCzAJ BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh c3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgNCBQdWJsaWMg UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5 MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB AQUAA4GNADCBiQKBgQC68OTP+cSuhVS5B1f5j8V/aBH4xBewRNzjMHPVKmIquNDM HO0oW369atyzkSTKQWI8/AIBvxwWMZQFl3Zuoq29YRdsTjCG8FE3KlDHqGKB3FtK qsGgtG7rL+VXxbErQHDbWk2hjh+9Ax/YA9SPTJlxvOKCzFjomDqG04Y48wApHwID AQABMA0GCSqGSIb3DQEBBQUAA4GBAIWMEsGnuVAVess+rLhDityq3RS6iYF+ATwj cSGIL4LcY/oCRaxFWdcqWERbt5+BO5JoPeI3JPV7bI92NZYJqFmduc4jq3TWg/0y cyfYaT5DdPauxYma51N86Xv2S/PBZYPejYqcPIiNOVn8qj8ijaHBZlCBckztImRP T8qAkbYp -----END CERTIFICATE----- Verisign Class 1 Public Primary Certification Authority - G3 ============================================================ -----BEGIN CERTIFICATE----- MIIEGjCCAwICEQCLW3VWhFSFCwDPrzhIzrGkMA0GCSqGSIb3DQEBBQUAMIHKMQsw CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT aWduIENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu IENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN2E1Lm0+afY8wR4 nN493GwTFtl63SRRZsDHJlkNrAYIwpTRMx/wgzUfbhvI3qpuFU5UJ+/EbRrsC+MO 8ESlV8dAWB6jRx9x7GD2bZTIGDnt/kIYVt/kTEkQeE4BdjVjEjbdZrwBBDajVWjV ojYJrKshJlQGrT/KFOCsyq0GHZXi+J3x4GD/wn91K0zM2v6HmSHquv4+VNfSWXjb PG7PoBMAGrgnoeS+Z5bKoMWznN3JdZ7rMJpfo83ZrngZPyPpXNspva1VyBtUjGP2 6KbqxzcSXKMpHgLZ2x87tNcPVkeBFQRKr4Mn0cVYiMHd9qqnoxjaaKptEVHhv2Vr n5Z20T0CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAq2aN17O6x5q25lXQBfGfMY1a qtmqRiYPce2lrVNWYgFHKkTp/j90CxObufRNG7LRX7K20ohcs5/Ny9Sn2WCVhDr4 wTcdYcrnsMXlkdpUpqwxga6X3s0IrLjAl4B/bnKk52kTlWUfxJM8/XmPBNQ+T+r3 ns7NZ3xPZQL/kYVUc8f/NveGLezQXk//EZ9yBta4GvFMDSZl4kSAHsef493oCtrs pSCAaWihT37ha88HQfqDjrw43bAuEbFrskLMmrz5SCJ5ShkPshw+IHTZasO+8ih4 E1Z5T21Q6huwtVexN2ZYI/PcD98Kh8TvhgXVOBRgmaNL3gaWcSzy27YfpO8/7g== -----END CERTIFICATE----- Verisign Class 2 Public Primary Certification Authority - G3 ============================================================ -----BEGIN CERTIFICATE----- MIIEGTCCAwECEGFwy0mMX5hFKeewptlQW3owDQYJKoZIhvcNAQEFBQAwgcoxCzAJ BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVy aVNpZ24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24s IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNp Z24gQ2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0 eSAtIEczMB4XDTk5MTAwMTAwMDAwMFoXDTM2MDcxNjIzNTk1OVowgcoxCzAJBgNV BAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNp Z24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24sIElu Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNpZ24g Q2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt IEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArwoNwtUs22e5LeWU J92lvuCwTY+zYVY81nzD9M0+hsuiiOLh2KRpxbXiv8GmR1BeRjmL1Za6tW8UvxDO JxOeBUebMXoT2B/Z0wI3i60sR/COgQanDTAM6/c8DyAd3HJG7qUCyFvDyVZpTMUY wZF7C9UTAJu878NIPkZgIIUq1ZC2zYugzDLdt/1AVbJQHFauzI13TccgTacxdu9o koqQHgiBVrKtaaNS0MscxCM9H5n+TOgWY47GCI72MfbS+uV23bUckqNJzc0BzWjN qWm6o+sdDZykIKbBoMXRRkwXbdKsZj+WjOCE1Db/IlnF+RFgqF8EffIa9iVCYQ/E Srg+iQIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQA0JhU8wI1NQ0kdvekhktdmnLfe xbjQ5F1fdiLAJvmEOjr5jLX77GDx6M4EsMjdpwOPMPOY36TmpDHf0xwLRtxyID+u 7gU8pDM/CzmscHhzS5kr3zDCVLCoO1Wh/hYozUK9dG6A2ydEp85EXdQbkJgNHkKU sQAsBNB0owIFImNjzYO1+8FtYmtpdf1dcEG59b98377BMnMiIYtYgXsVkXq642RI sH/7NiXaldDxJBQX3RiAa0YjOVT1jmIJBB2UkKab5iXiQkWquJCtvgiPqQtCGJTP cjnhsUPgKM+351psE2tJs//jGHyJizNdrDPXp/naOlXJWBD5qu9ats9LS98q -----END CERTIFICATE----- Verisign Class 3 Public Primary Certification Authority - G3 ============================================================ -----BEGIN CERTIFICATE----- MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQsw CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT aWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu IENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMu6nFL8eB8aHm8b N3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1EUGO+i2t KmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGu kxUccLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBm CC+Vk7+qRy+oRpfwEuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJ Xwzw3sJ2zq/3avL6QaaiMxTJ5Xpj055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWu imi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAERSWwauSCPc/L8my/uRan2Te 2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5fj267Cz3qWhMe DGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC /Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565p F4ErWjfJXir0xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGt TxzhT5yvDwyd93gN2PQ1VoDat20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ== -----END CERTIFICATE----- Verisign Class 4 Public Primary Certification Authority - G3 ============================================================ -----BEGIN CERTIFICATE----- MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQsw CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT aWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu IENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3LpRFpxlmr8Y+1 GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaStBO3IFsJ +mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0Gbd U6LM8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLm NxdLMEYH5IBtptiWLugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XY ufTsgsbSPZUd5cBPhMnZo0QoBmrXRazwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/ ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAj/ola09b5KROJ1WrIhVZPMq1 CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXttmhwwjIDLk5Mq g6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c 2NU8Qh0XwRJdRTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/ bLvSHgCwIe34QWKCudiyxLtGUPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg== -----END CERTIFICATE----- Equifax Secure Global eBusiness CA ================================== -----BEGIN CERTIFICATE----- MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEc MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBT ZWN1cmUgR2xvYmFsIGVCdXNpbmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIw MDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0VxdWlmYXggU2Vj dXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEdsb2JhbCBlQnVzaW5l c3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRVPEnC UdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc 58O/gGzNqfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/ o5brhTMhHD4ePmBudpxnhcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAH MA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUvqigdHJQa0S3ySPY+6j/s1dr aGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hsMA0GCSqGSIb3DQEBBAUA A4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okENI7SS+RkA Z70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv 8qIYNMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV -----END CERTIFICATE----- Equifax Secure eBusiness CA 1 ============================= -----BEGIN CERTIFICATE----- MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEc MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBT ZWN1cmUgZUJ1c2luZXNzIENBLTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQw MDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5j LjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENBLTEwgZ8wDQYJ KoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ1MRo RvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBu WqDZQu4aIZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKw Env+j6YDAgMBAAGjZjBkMBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTAD AQH/MB8GA1UdIwQYMBaAFEp4MlIR21kWNl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRK eDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQFAAOBgQB1W6ibAxHm6VZM zfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5lSE/9dR+ WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN /Bf+KpYrtWKmpj29f5JZzVoqgrI3eQ== -----END CERTIFICATE----- Equifax Secure eBusiness CA 2 ============================= -----BEGIN CERTIFICATE----- MIIDIDCCAomgAwIBAgIEN3DPtTANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV UzEXMBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2Vj dXJlIGVCdXNpbmVzcyBDQS0yMB4XDTk5MDYyMzEyMTQ0NVoXDTE5MDYyMzEyMTQ0 NVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkVxdWlmYXggU2VjdXJlMSYwJAYD VQQLEx1FcXVpZmF4IFNlY3VyZSBlQnVzaW5lc3MgQ0EtMjCBnzANBgkqhkiG9w0B AQEFAAOBjQAwgYkCgYEA5Dk5kx5SBhsoNviyoynF7Y6yEb3+6+e0dMKP/wXn2Z0G vxLIPw7y1tEkshHe0XMJitSxLJgJDR5QRrKDpkWNYmi7hRsgcDKqQM2mll/EcTc/ BPO3QSQ5BxoeLmFYoBIL5aXfxavqN3HMHMg3OrmXUqesxWoklE6ce8/AatbfIb0C AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEX MBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2VjdXJl IGVCdXNpbmVzcyBDQS0yMQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTkw NjIzMTIxNDQ1WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUUJ4L6q9euSBIplBq y/3YIHqngnYwHQYDVR0OBBYEFFCeC+qvXrkgSKZQasv92CB6p4J2MAwGA1UdEwQF MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA A4GBAAyGgq3oThr1jokn4jVYPSm0B482UJW/bsGe68SQsoWou7dC4A8HOd/7npCy 0cE+U58DRLB+S/Rv5Hwf5+Kx5Lia78O9zt4LMjTZ3ijtM2vE1Nc9ElirfQkty3D1 E4qUoSek1nDFbZS1yX2doNLGCEnZZpum0/QL3MUmV+GRMOrN -----END CERTIFICATE----- Thawte Time Stamping CA ======================= -----BEGIN CERTIFICATE----- MIICoTCCAgqgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBizELMAkGA1UEBhMCWkEx FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTEUMBIGA1UEBxMLRHVyYmFudmlsbGUxDzAN BgNVBAoTBlRoYXd0ZTEdMBsGA1UECxMUVGhhd3RlIENlcnRpZmljYXRpb24xHzAd BgNVBAMTFlRoYXd0ZSBUaW1lc3RhbXBpbmcgQ0EwHhcNOTcwMTAxMDAwMDAwWhcN MjAxMjMxMjM1OTU5WjCBizELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4g Q2FwZTEUMBIGA1UEBxMLRHVyYmFudmlsbGUxDzANBgNVBAoTBlRoYXd0ZTEdMBsG A1UECxMUVGhhd3RlIENlcnRpZmljYXRpb24xHzAdBgNVBAMTFlRoYXd0ZSBUaW1l c3RhbXBpbmcgQ0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANYrWHhhRYZT 6jR7UZztsOYuGA7+4F+oJ9O0yeB8WU4WDnNUYMF/9p8u6TqFJBU820cEY8OexJQa Wt9MevPZQx08EHp5JduQ/vBR5zDWQQD9nyjfeb6Uu522FOMjhdepQeBMpHmwKxqL 8vg7ij5FrHGSALSQQZj7X+36ty6K+Ig3AgMBAAGjEzARMA8GA1UdEwEB/wQFMAMB Af8wDQYJKoZIhvcNAQEEBQADgYEAZ9viwuaHPUCDhjc1fR/OmsMMZiCouqoEiYbC 9RAIDb/LogWK0E02PvTX72nGXuSwlG9KuefeW4i2e9vjJ+V2w/A1wcu1J5szedyQ pgCed/r8zSeUQhac0xxo7L9c3eWpexAKMnRUEzGLhQOEkbdYATAUOK8oyvyxUBkZ CayJSdM= -----END CERTIFICATE----- thawte Primary Root CA ====================== -----BEGIN CERTIFICATE----- MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCB qTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw MDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNV BAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3MDAwMDAwWhcNMzYw NzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5j LjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYG A1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl IG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqG SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCsoPD7gFnUnMekz52hWXMJEEUMDSxuaPFs W0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ1CRfBsDMRJSUjQJib+ta 3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGcq/gcfomk 6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6 Sk/KaAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94J NqR32HuHUETVPm4pafs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBA MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XP r87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUFAAOCAQEAeRHAS7ORtvzw6WfU DW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeEuzLlQRHAd9mz YJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2 /qxAeeWsEG89jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/ LHbTY5xZ3Y+m4Q6gLkH3LpVHz7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7 jVaMaA== -----END CERTIFICATE----- VeriSign Class 3 Public Primary Certification Authority - G5 ============================================================ -----BEGIN CERTIFICATE----- MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCB yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0 aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2ln biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y aXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvJAgIKXo1 nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKzj/i5Vbex t0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIz SdhDY2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQG BO+QueQA5N06tRn/Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+ rCpSx4/VBEnkjWNHiDxpg8v+R70rfk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/ NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E BAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH BgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv MzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE p6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y 5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ 4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq -----END CERTIFICATE----- Entrust.net Secure Server Certification Authority ================================================= -----BEGIN CERTIFICATE----- MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc KGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5u ZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1 MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UE ChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5j b3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUg U2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUA A4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQaO2f55M28Qpku0f1BBc/ I0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5gXpa0zf3 wkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OC AdcwggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHb oIHYpIHVMIHSMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5 BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1p dHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1pdGVk MTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRp b24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0 MFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi E1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa MAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI hvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN 95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9n9cd 2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI= -----END CERTIFICATE----- ================================================ FILE: deploy/third_party/boto-2.1.1/boto/cloudformation/__init__.py ================================================ # Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010-2011, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # this is here for backward compatibility # originally, the SNSConnection class was defined here from connection import CloudFormationConnection ================================================ FILE: deploy/third_party/boto-2.1.1/boto/cloudformation/connection.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. try: import simplejson as json except: import json import boto from boto.cloudformation.stack import Stack, StackSummary, StackEvent from boto.cloudformation.stack import StackResource, StackResourceSummary from boto.cloudformation.template import Template from boto.connection import AWSQueryConnection from boto.regioninfo import RegionInfo class CloudFormationConnection(AWSQueryConnection): """ A Connection to the CloudFormation Service. """ DefaultRegionName = 'us-east-1' DefaultRegionEndpoint = 'cloudformation.us-east-1.amazonaws.com' APIVersion = '2010-05-15' valid_states = ("CREATE_IN_PROGRESS", "CREATE_FAILED", "CREATE_COMPLETE", "ROLLBACK_IN_PROGRESS", "ROLLBACK_FAILED", "ROLLBACK_COMPLETE", "DELETE_IN_PROGRESS", "DELETE_FAILED", "DELETE_COMPLETE") def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, region=None, path='/', converter=None): if not region: region = RegionInfo(self, self.DefaultRegionName, self.DefaultRegionEndpoint, CloudFormationConnection) self.region = region AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, self.region.endpoint, debug, https_connection_factory, path) def _required_auth_capability(self): return ['cloudformation'] def encode_bool(self, v): v = bool(v) return {True: "true", False: "false"}[v] def create_stack(self, stack_name, template_body=None, template_url=None, parameters=[], notification_arns=[], disable_rollback=False, timeout_in_minutes=None): """ Creates a CloudFormation Stack as specified by the template. :type stack_name: string :param stack_name: The name of the Stack, must be unique amoung running Stacks :type template_body: string :param template_body: The template body (JSON string) :type template_url: string :param template_url: An S3 URL of a stored template JSON document. If both the template_body and template_url are specified, the template_body takes precedence :type parameters: list of tuples :param parameters: A list of (key, value) pairs for template input parameters. :type notification_arns: list of strings :param notification_arns: A list of SNS topics to send Stack event notifications to :type disable_rollback: bool :param disable_rollback: Indicates whether or not to rollback on failure :type timeout_in_minutes: int :param timeout_in_minutes: Maximum amount of time to let the Stack spend creating itself. If this timeout is exceeded, the Stack will enter the CREATE_FAILED state :rtype: string :return: The unique Stack ID """ params = {'ContentType': "JSON", 'StackName': stack_name, 'DisableRollback': self.encode_bool(disable_rollback)} if template_body: params['TemplateBody'] = template_body if template_url: params['TemplateURL'] = template_url if template_body and template_url: boto.log.warning("If both TemplateBody and TemplateURL are" " specified, only TemplateBody will be honored by the API") if len(parameters) > 0: for i, (key, value) in enumerate(parameters): params['Parameters.member.%d.ParameterKey' % (i+1)] = key params['Parameters.member.%d.ParameterValue' % (i+1)] = value if len(notification_arns) > 0: self.build_list_params(params, notification_arns, "NotificationARNs.member") if timeout_in_minutes: params['TimeoutInMinutes'] = int(timeout_in_minutes) response = self.make_request('CreateStack', params, '/', 'POST') body = response.read() if response.status == 200: body = json.loads(body) return body['CreateStackResponse']['CreateStackResult']['StackId'] else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def delete_stack(self, stack_name_or_id): params = {'ContentType': "JSON", 'StackName': stack_name_or_id} # TODO: change this to get_status ? response = self.make_request('DeleteStack', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def describe_stack_events(self, stack_name_or_id=None, next_token=None): params = {} if stack_name_or_id: params['StackName'] = stack_name_or_id if next_token: params['NextToken'] = next_token return self.get_list('DescribeStackEvents', params, [('member', StackEvent)]) def describe_stack_resource(self, stack_name_or_id, logical_resource_id): params = {'ContentType': "JSON", 'StackName': stack_name_or_id, 'LogicalResourceId': logical_resource_id} response = self.make_request('DescribeStackResource', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def describe_stack_resources(self, stack_name_or_id=None, logical_resource_id=None, physical_resource_id=None): params = {} if stack_name_or_id: params['StackName'] = stack_name_or_id if logical_resource_id: params['LogicalResourceId'] = logical_resource_id if physical_resource_id: params['PhysicalResourceId'] = physical_resource_id return self.get_list('DescribeStackResources', params, [('member', StackResource)]) def describe_stacks(self, stack_name_or_id=None): params = {} if stack_name_or_id: params['StackName'] = stack_name_or_id return self.get_list('DescribeStacks', params, [('member', Stack)]) def get_template(self, stack_name_or_id): params = {'ContentType': "JSON", 'StackName': stack_name_or_id} response = self.make_request('GetTemplate', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def list_stack_resources(self, stack_name_or_id, next_token=None): params = {'StackName': stack_name_or_id} if next_token: params['NextToken'] = next_token return self.get_list('ListStackResources', params, [('member', StackResourceSummary)]) def list_stacks(self, stack_status_filters=[], next_token=None): params = {} if next_token: params['NextToken'] = next_token if len(stack_status_filters) > 0: self.build_list_params(params, stack_status_filters, "StackStatusFilter.member") return self.get_list('ListStacks', params, [('member', StackSummary)]) def validate_template(self, template_body=None, template_url=None): params = {} if template_body: params['TemplateBody'] = template_body if template_url: params['TemplateUrl'] = template_url if template_body and template_url: boto.log.warning("If both TemplateBody and TemplateURL are" " specified, only TemplateBody will be honored by the API") return self.get_object('ValidateTemplate', params, Template, verb="POST") ================================================ FILE: deploy/third_party/boto-2.1.1/boto/cloudformation/stack.py ================================================ from datetime import datetime from boto.resultset import ResultSet class Stack: def __init__(self, connection=None): self.connection = connection self.creation_time = None self.description = None self.disable_rollback = None self.notification_arns = [] self.outputs = [] self.parameters = [] self.stack_id = None self.stack_status = None self.stack_name = None self.stack_name_reason = None self.timeout_in_minutes = None def startElement(self, name, attrs, connection): if name == "Parameters": self.parameters = ResultSet([('member', Parameter)]) return self.parameters elif name == "Outputs": self.outputs = ResultSet([('member', Output)]) return self.outputs else: return None def endElement(self, name, value, connection): if name == 'CreationTime': self.creation_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ') elif name == "Description": self.description = value elif name == "DisableRollback": self.disable_rollback = bool(value) elif name == "NotificationARNs": self.notification_arns = value elif name == 'StackId': self.stack_id = value elif name == 'StackName': self.stack_name = value elif name == 'StackStatus': self.stack_status = value elif name == "StackStatusReason": self.stack_status_reason = value elif name == "TimeoutInMinutes": self.timeout_in_minutes = int(value) elif name == "member": pass else: setattr(self, name, value) def delete(self): return self.connection.delete_stack(stack_name_or_id=self.stack_id) def describe_events(self, next_token=None): return self.connection.describe_stack_events( stack_name_or_id=self.stack_id, next_token=next_token ) def describe_resource(self, logical_resource_id): return self.connection.describe_stack_resource( stack_name_or_id=self.stack_id, logical_resource_id=logical_resource_id ) def describe_resources(self, logical_resource_id=None, physical_resource_id=None): return self.connection.describe_stack_resources( stack_name_or_id=self.stack_id, logical_resource_id=logical_resource_id, physical_resource_id=physical_resource_id ) def list_resources(self, next_token=None): return self.connection.list_stack_resources( stack_name_or_id=self.stack_id, next_token=next_token ) def update(self): rs = self.connection.describe_stacks(self.stack_id) if len(rs) == 1 and rs[0].stack_id == self.stack_id: self.__dict__.update(rs[0].__dict__) else: raise ValueError("%s is not a valid Stack ID or Name" % self.stack_id) def get_template(self): return self.connection.get_template(stack_name_or_id=self.stack_id) class StackSummary: def __init__(self, connection=None): self.connection = connection self.stack_id = None self.stack_status = None self.stack_name = None self.creation_time = None self.deletion_time = None self.template_description = None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'StackId': self.stack_id = value elif name == 'StackStatus': self.stack_status = value elif name == 'StackName': self.stack_name = value elif name == 'CreationTime': self.creation_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ') elif name == "DeletionTime": self.deletion_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ') elif name == 'TemplateDescription': self.template_description = value elif name == "member": pass else: setattr(self, name, value) class Parameter: def __init__(self, connection=None): self.connection = None self.key = None self.value = None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == "ParameterKey": self.key = value elif name == "ParameterValue": self.value = value else: setattr(self, name, value) def __repr__(self): return "Parameter:\"%s\"=\"%s\"" % (self.key, self.value) class Output: def __init__(self, connection=None): self.connection = connection self.description = None self.key = None self.value = None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == "Description": self.description = value elif name == "OutputKey": self.key = value elif name == "OutputValue": self.value = value else: setattr(self, name, value) def __repr__(self): return "Output:\"%s\"=\"%s\"" % (self.key, self.value) class StackResource: def __init__(self, connection=None): self.connection = connection self.description = None self.logical_resource_id = None self.physical_resource_id = None self.resource_status = None self.resource_status_reason = None self.resource_type = None self.stack_id = None self.stack_name = None self.timestamp = None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == "Description": self.description = value elif name == "LogicalResourceId": self.logical_resource_id = value elif name == "PhysicalResourceId": self.physical_resource_id = value elif name == "ResourceStatus": self.resource_status = value elif name == "ResourceStatusReason": self.resource_status_reason = value elif name == "ResourceType": self.resource_type = value elif name == "StackId": self.stack_id = value elif name == "StackName": self.stack_name = value elif name == "Timestamp": self.timestamp = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ') else: setattr(self, name, value) def __repr__(self): return "StackResource:%s (%s)" % (self.logical_resource_id, self.resource_type) class StackResourceSummary: def __init__(self, connection=None): self.connection = connection self.last_updated_timestamp = None self.logical_resource_id = None self.physical_resource_id = None self.resource_status = None self.resource_status_reason = None self.resource_type = None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == "LastUpdatedTimestamp": self.last_updated_timestampe = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ') elif name == "LogicalResourceId": self.logical_resource_id = value elif name == "PhysicalResourceId": self.physical_resource_id = value elif name == "ResourceStatus": self.resource_status = value elif name == "ResourceStatusReason": self.resource_status_reason = value elif name == "ResourceType": self.resource_type = value else: setattr(self, name, value) def __repr__(self): return "StackResourceSummary:%s (%s)" % (self.logical_resource_id, self.resource_type) class StackEvent: valid_states = ("CREATE_IN_PROGRESS", "CREATE_FAILED", "CREATE_COMPLETE", "DELETE_IN_PROGRESS", "DELETE_FAILED", "DELETE_COMPLETE") def __init__(self, connection=None): self.connection = connection self.event_id = None self.logical_resource_id = None self.physical_resource_id = None self.resource_properties = None self.resource_status = None self.resource_status_reason = None self.resource_type = None self.stack_id = None self.stack_name = None self.timestamp = None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == "EventId": self.event_id = value elif name == "LogicalResourceId": self.logical_resource_id = value elif name == "PhysicalResourceId": self.physical_resource_id = value elif name == "ResourceProperties": self.resource_properties = value elif name == "ResourceStatus": self.resource_status = value elif name == "ResourceStatusReason": self.resource_status_reason = value elif name == "ResourceType": self.resource_type = value elif name == "StackId": self.stack_id = value elif name == "StackName": self.stack_name = value elif name == "Timestamp": self.timestamp = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ') else: setattr(self, name, value) def __repr__(self): return "StackEvent %s %s %s" % (self.resource_type, self.logical_resource_id, self.resource_status) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/cloudformation/template.py ================================================ from boto.resultset import ResultSet class Template: def __init__(self, connection=None): self.connection = connection self.description = None self.template_parameters = None def startElement(self, name, attrs, connection): if name == "Parameters": self.template_parameters = ResultSet([('member', TemplateParameter)]) return self.template_parameters else: return None def endElement(self, name, value, connection): if name == "Description": self.description = value else: setattr(self, name, value) class TemplateParameter: def __init__(self, parent): self.parent = parent self.default_value = None self.description = None self.no_echo = None self.parameter_key = None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == "DefaultValue": self.default_value = value elif name == "Description": self.description = value elif name == "NoEcho": self.no_echo = bool(value) elif name == "ParameterKey": self.parameter_key = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/cloudfront/__init__.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # import xml.sax import time import boto from boto.connection import AWSAuthConnection from boto import handler from boto.cloudfront.distribution import Distribution, DistributionSummary, DistributionConfig from boto.cloudfront.distribution import StreamingDistribution, StreamingDistributionSummary, StreamingDistributionConfig from boto.cloudfront.identity import OriginAccessIdentity from boto.cloudfront.identity import OriginAccessIdentitySummary from boto.cloudfront.identity import OriginAccessIdentityConfig from boto.cloudfront.invalidation import InvalidationBatch from boto.resultset import ResultSet from boto.cloudfront.exception import CloudFrontServerError class CloudFrontConnection(AWSAuthConnection): DefaultHost = 'cloudfront.amazonaws.com' Version = '2010-11-01' def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, port=None, proxy=None, proxy_port=None, host=DefaultHost, debug=0): AWSAuthConnection.__init__(self, host, aws_access_key_id, aws_secret_access_key, True, port, proxy, proxy_port, debug=debug) def get_etag(self, response): response_headers = response.msg for key in response_headers.keys(): if key.lower() == 'etag': return response_headers[key] return None def _required_auth_capability(self): return ['cloudfront'] # Generics def _get_all_objects(self, resource, tags): if not tags: tags=[('DistributionSummary', DistributionSummary)] response = self.make_request('GET', '/%s/%s' % (self.Version, resource)) body = response.read() boto.log.debug(body) if response.status >= 300: raise CloudFrontServerError(response.status, response.reason, body) rs = ResultSet(tags) h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs def _get_info(self, id, resource, dist_class): uri = '/%s/%s/%s' % (self.Version, resource, id) response = self.make_request('GET', uri) body = response.read() boto.log.debug(body) if response.status >= 300: raise CloudFrontServerError(response.status, response.reason, body) d = dist_class(connection=self) response_headers = response.msg for key in response_headers.keys(): if key.lower() == 'etag': d.etag = response_headers[key] h = handler.XmlHandler(d, self) xml.sax.parseString(body, h) return d def _get_config(self, id, resource, config_class): uri = '/%s/%s/%s/config' % (self.Version, resource, id) response = self.make_request('GET', uri) body = response.read() boto.log.debug(body) if response.status >= 300: raise CloudFrontServerError(response.status, response.reason, body) d = config_class(connection=self) d.etag = self.get_etag(response) h = handler.XmlHandler(d, self) xml.sax.parseString(body, h) return d def _set_config(self, distribution_id, etag, config): if isinstance(config, StreamingDistributionConfig): resource = 'streaming-distribution' else: resource = 'distribution' uri = '/%s/%s/%s/config' % (self.Version, resource, distribution_id) headers = {'If-Match' : etag, 'Content-Type' : 'text/xml'} response = self.make_request('PUT', uri, headers, config.to_xml()) body = response.read() boto.log.debug(body) if response.status != 200: raise CloudFrontServerError(response.status, response.reason, body) return self.get_etag(response) def _create_object(self, config, resource, dist_class): response = self.make_request('POST', '/%s/%s' % (self.Version, resource), {'Content-Type' : 'text/xml'}, data=config.to_xml()) body = response.read() boto.log.debug(body) if response.status == 201: d = dist_class(connection=self) h = handler.XmlHandler(d, self) xml.sax.parseString(body, h) d.etag = self.get_etag(response) return d else: raise CloudFrontServerError(response.status, response.reason, body) def _delete_object(self, id, etag, resource): uri = '/%s/%s/%s' % (self.Version, resource, id) response = self.make_request('DELETE', uri, {'If-Match' : etag}) body = response.read() boto.log.debug(body) if response.status != 204: raise CloudFrontServerError(response.status, response.reason, body) # Distributions def get_all_distributions(self): tags=[('DistributionSummary', DistributionSummary)] return self._get_all_objects('distribution', tags) def get_distribution_info(self, distribution_id): return self._get_info(distribution_id, 'distribution', Distribution) def get_distribution_config(self, distribution_id): return self._get_config(distribution_id, 'distribution', DistributionConfig) def set_distribution_config(self, distribution_id, etag, config): return self._set_config(distribution_id, etag, config) def create_distribution(self, origin, enabled, caller_reference='', cnames=None, comment='', trusted_signers=None): config = DistributionConfig(origin=origin, enabled=enabled, caller_reference=caller_reference, cnames=cnames, comment=comment, trusted_signers=trusted_signers) return self._create_object(config, 'distribution', Distribution) def delete_distribution(self, distribution_id, etag): return self._delete_object(distribution_id, etag, 'distribution') # Streaming Distributions def get_all_streaming_distributions(self): tags=[('StreamingDistributionSummary', StreamingDistributionSummary)] return self._get_all_objects('streaming-distribution', tags) def get_streaming_distribution_info(self, distribution_id): return self._get_info(distribution_id, 'streaming-distribution', StreamingDistribution) def get_streaming_distribution_config(self, distribution_id): return self._get_config(distribution_id, 'streaming-distribution', StreamingDistributionConfig) def set_streaming_distribution_config(self, distribution_id, etag, config): return self._set_config(distribution_id, etag, config) def create_streaming_distribution(self, origin, enabled, caller_reference='', cnames=None, comment='', trusted_signers=None): config = StreamingDistributionConfig(origin=origin, enabled=enabled, caller_reference=caller_reference, cnames=cnames, comment=comment, trusted_signers=trusted_signers) return self._create_object(config, 'streaming-distribution', StreamingDistribution) def delete_streaming_distribution(self, distribution_id, etag): return self._delete_object(distribution_id, etag, 'streaming-distribution') # Origin Access Identity def get_all_origin_access_identity(self): tags=[('CloudFrontOriginAccessIdentitySummary', OriginAccessIdentitySummary)] return self._get_all_objects('origin-access-identity/cloudfront', tags) def get_origin_access_identity_info(self, access_id): return self._get_info(access_id, 'origin-access-identity/cloudfront', OriginAccessIdentity) def get_origin_access_identity_config(self, access_id): return self._get_config(access_id, 'origin-access-identity/cloudfront', OriginAccessIdentityConfig) def set_origin_access_identity_config(self, access_id, etag, config): return self._set_config(access_id, etag, config) def create_origin_access_identity(self, caller_reference='', comment=''): config = OriginAccessIdentityConfig(caller_reference=caller_reference, comment=comment) return self._create_object(config, 'origin-access-identity/cloudfront', OriginAccessIdentity) def delete_origin_access_identity(self, access_id, etag): return self._delete_object(access_id, etag, 'origin-access-identity/cloudfront') # Object Invalidation def create_invalidation_request(self, distribution_id, paths, caller_reference=None): """Creates a new invalidation request :see: http://goo.gl/8vECq """ # We allow you to pass in either an array or # an InvalidationBatch object if not isinstance(paths, InvalidationBatch): paths = InvalidationBatch(paths) paths.connection = self uri = '/%s/distribution/%s/invalidation' % (self.Version, distribution_id) response = self.make_request('POST', uri, {'Content-Type' : 'text/xml'}, data=paths.to_xml()) body = response.read() if response.status == 201: h = handler.XmlHandler(paths, self) xml.sax.parseString(body, h) return paths else: raise CloudFrontServerError(response.status, response.reason, body) def invalidation_request_status (self, distribution_id, request_id, caller_reference=None): uri = '/%s/distribution/%s/invalidation/%s' % (self.Version, distribution_id, request_id ) response = self.make_request('GET', uri, {'Content-Type' : 'text/xml'}) body = response.read() if response.status == 200: paths = InvalidationBatch([]) h = handler.XmlHandler(paths, self) xml.sax.parseString(body, h) return paths else: raise CloudFrontServerError(response.status, response.reason, body) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/cloudfront/distribution.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import uuid import base64 import json from boto.cloudfront.identity import OriginAccessIdentity from boto.cloudfront.object import Object, StreamingObject from boto.cloudfront.signers import ActiveTrustedSigners, TrustedSigners from boto.cloudfront.logging import LoggingInfo from boto.cloudfront.origin import S3Origin, CustomOrigin from boto.s3.acl import ACL class DistributionConfig: def __init__(self, connection=None, origin=None, enabled=False, caller_reference='', cnames=None, comment='', trusted_signers=None, default_root_object=None, logging=None): """ :param origin: Origin information to associate with the distribution. If your distribution will use an Amazon S3 origin, then this should be an S3Origin object. If your distribution will use a custom origin (non Amazon S3), then this should be a CustomOrigin object. :type origin: :class:`boto.cloudfront.origin.S3Origin` or :class:`boto.cloudfront.origin.CustomOrigin` :param enabled: Whether the distribution is enabled to accept end user requests for content. :type enabled: bool :param caller_reference: A unique number that ensures the request can't be replayed. If no caller_reference is provided, boto will generate a type 4 UUID for use as the caller reference. :type enabled: str :param cnames: A CNAME alias you want to associate with this distribution. You can have up to 10 CNAME aliases per distribution. :type enabled: array of str :param comment: Any comments you want to include about the distribution. :type comment: str :param trusted_signers: Specifies any AWS accounts you want to permit to create signed URLs for private content. If you want the distribution to use signed URLs, this should contain a TrustedSigners object; if you want the distribution to use basic URLs, leave this None. :type trusted_signers: :class`boto.cloudfront.signers.TrustedSigners` :param default_root_object: Designates a default root object. Only include a DefaultRootObject value if you are going to assign a default root object for the distribution. :type comment: str :param logging: Controls whether access logs are written for the distribution. If you want to turn on access logs, this should contain a LoggingInfo object; otherwise it should contain None. :type logging: :class`boto.cloudfront.logging.LoggingInfo` """ self.connection = connection self.origin = origin self.enabled = enabled if caller_reference: self.caller_reference = caller_reference else: self.caller_reference = str(uuid.uuid4()) self.cnames = [] if cnames: self.cnames = cnames self.comment = comment self.trusted_signers = trusted_signers self.logging = None self.default_root_object = default_root_object def to_xml(self): s = '\n' s += '\n' if self.origin: s += self.origin.to_xml() s += ' %s\n' % self.caller_reference for cname in self.cnames: s += ' %s\n' % cname if self.comment: s += ' %s\n' % self.comment s += ' ' if self.enabled: s += 'true' else: s += 'false' s += '\n' if self.trusted_signers: s += '\n' for signer in self.trusted_signers: if signer == 'Self': s += ' \n' else: s += ' %s\n' % signer s += '\n' if self.logging: s += '\n' s += ' %s\n' % self.logging.bucket s += ' %s\n' % self.logging.prefix s += '\n' if self.default_root_object: dro = self.default_root_object s += '%s\n' % dro s += '\n' return s def startElement(self, name, attrs, connection): if name == 'TrustedSigners': self.trusted_signers = TrustedSigners() return self.trusted_signers elif name == 'Logging': self.logging = LoggingInfo() return self.logging elif name == 'S3Origin': self.origin = S3Origin() return self.origin elif name == 'CustomOrigin': self.origin = CustomOrigin() return self.origin else: return None def endElement(self, name, value, connection): if name == 'CNAME': self.cnames.append(value) elif name == 'Comment': self.comment = value elif name == 'Enabled': if value.lower() == 'true': self.enabled = True else: self.enabled = False elif name == 'CallerReference': self.caller_reference = value elif name == 'DefaultRootObject': self.default_root_object = value else: setattr(self, name, value) class StreamingDistributionConfig(DistributionConfig): def __init__(self, connection=None, origin='', enabled=False, caller_reference='', cnames=None, comment='', trusted_signers=None, logging=None): DistributionConfig.__init__(self, connection=connection, origin=origin, enabled=enabled, caller_reference=caller_reference, cnames=cnames, comment=comment, trusted_signers=trusted_signers, logging=logging) def to_xml(self): s = '\n' s += '\n' if self.origin: s += self.origin.to_xml() s += ' %s\n' % self.caller_reference for cname in self.cnames: s += ' %s\n' % cname if self.comment: s += ' %s\n' % self.comment s += ' ' if self.enabled: s += 'true' else: s += 'false' s += '\n' if self.trusted_signers: s += '\n' for signer in self.trusted_signers: if signer == 'Self': s += ' \n' else: s += ' %s\n' % signer s += '\n' if self.logging: s += '\n' s += ' %s\n' % self.logging.bucket s += ' %s\n' % self.logging.prefix s += '\n' s += '\n' return s class DistributionSummary: def __init__(self, connection=None, domain_name='', id='', last_modified_time=None, status='', origin=None, cname='', comment='', enabled=False): self.connection = connection self.domain_name = domain_name self.id = id self.last_modified_time = last_modified_time self.status = status self.origin = origin self.enabled = enabled self.cnames = [] if cname: self.cnames.append(cname) self.comment = comment self.trusted_signers = None self.etag = None self.streaming = False def startElement(self, name, attrs, connection): if name == 'TrustedSigners': self.trusted_signers = TrustedSigners() return self.trusted_signers elif name == 'S3Origin': self.origin = S3Origin() return self.origin elif name == 'CustomOrigin': self.origin = CustomOrigin() return self.origin return None def endElement(self, name, value, connection): if name == 'Id': self.id = value elif name == 'Status': self.status = value elif name == 'LastModifiedTime': self.last_modified_time = value elif name == 'DomainName': self.domain_name = value elif name == 'Origin': self.origin = value elif name == 'CNAME': self.cnames.append(value) elif name == 'Comment': self.comment = value elif name == 'Enabled': if value.lower() == 'true': self.enabled = True else: self.enabled = False elif name == 'StreamingDistributionSummary': self.streaming = True else: setattr(self, name, value) def get_distribution(self): return self.connection.get_distribution_info(self.id) class StreamingDistributionSummary(DistributionSummary): def get_distribution(self): return self.connection.get_streaming_distribution_info(self.id) class Distribution: def __init__(self, connection=None, config=None, domain_name='', id='', last_modified_time=None, status=''): self.connection = connection self.config = config self.domain_name = domain_name self.id = id self.last_modified_time = last_modified_time self.status = status self.in_progress_invalidation_batches = 0 self.active_signers = None self.etag = None self._bucket = None self._object_class = Object def startElement(self, name, attrs, connection): if name == 'DistributionConfig': self.config = DistributionConfig() return self.config elif name == 'ActiveTrustedSigners': self.active_signers = ActiveTrustedSigners() return self.active_signers else: return None def endElement(self, name, value, connection): if name == 'Id': self.id = value elif name == 'LastModifiedTime': self.last_modified_time = value elif name == 'Status': self.status = value elif name == 'InProgressInvalidationBatches': self.in_progress_invalidation_batches = int(value) elif name == 'DomainName': self.domain_name = value else: setattr(self, name, value) def update(self, enabled=None, cnames=None, comment=None): """ Update the configuration of the Distribution. The only values of the DistributionConfig that can be directly updated are: * CNAMES * Comment * Whether the Distribution is enabled or not Any changes to the ``trusted_signers`` or ``origin`` properties of this distribution's current config object will also be included in the update. Therefore, to set the origin access identity for this distribution, set ``Distribution.config.origin.origin_access_identity`` before calling this update method. :type enabled: bool :param enabled: Whether the Distribution is active or not. :type cnames: list of str :param cnames: The DNS CNAME's associated with this Distribution. Maximum of 10 values. :type comment: str or unicode :param comment: The comment associated with the Distribution. """ new_config = DistributionConfig(self.connection, self.config.origin, self.config.enabled, self.config.caller_reference, self.config.cnames, self.config.comment, self.config.trusted_signers, self.config.default_root_object) if enabled != None: new_config.enabled = enabled if cnames != None: new_config.cnames = cnames if comment != None: new_config.comment = comment self.etag = self.connection.set_distribution_config(self.id, self.etag, new_config) self.config = new_config self._object_class = Object def enable(self): """ Deactivate the Distribution. A convenience wrapper around the update method. """ self.update(enabled=True) def disable(self): """ Activate the Distribution. A convenience wrapper around the update method. """ self.update(enabled=False) def delete(self): """ Delete this CloudFront Distribution. The content associated with the Distribution is not deleted from the underlying Origin bucket in S3. """ self.connection.delete_distribution(self.id, self.etag) def _get_bucket(self): if isinstance(self.config.origin, S3Origin): if not self._bucket: bucket_dns_name = self.config.origin.dns_name bucket_name = bucket_dns_name.replace('.s3.amazonaws.com', '') from boto.s3.connection import S3Connection s3 = S3Connection(self.connection.aws_access_key_id, self.connection.aws_secret_access_key, proxy=self.connection.proxy, proxy_port=self.connection.proxy_port, proxy_user=self.connection.proxy_user, proxy_pass=self.connection.proxy_pass) self._bucket = s3.get_bucket(bucket_name) self._bucket.distribution = self self._bucket.set_key_class(self._object_class) return self._bucket else: raise NotImplementedError('Unable to get_objects on CustomOrigin') def get_objects(self): """ Return a list of all content objects in this distribution. :rtype: list of :class:`boto.cloudfront.object.Object` :return: The content objects """ bucket = self._get_bucket() objs = [] for key in bucket: objs.append(key) return objs def set_permissions(self, object, replace=False): """ Sets the S3 ACL grants for the given object to the appropriate value based on the type of Distribution. If the Distribution is serving private content the ACL will be set to include the Origin Access Identity associated with the Distribution. If the Distribution is serving public content the content will be set up with "public-read". :type object: :class:`boto.cloudfront.object.Object` :param enabled: The Object whose ACL is being set :type replace: bool :param replace: If False, the Origin Access Identity will be appended to the existing ACL for the object. If True, the ACL for the object will be completely replaced with one that grants READ permission to the Origin Access Identity. """ if isinstance(self.config.origin, S3Origin): if self.config.origin.origin_access_identity: id = self.config.origin.origin_access_identity.split('/')[-1] oai = self.connection.get_origin_access_identity_info(id) policy = object.get_acl() if replace: policy.acl = ACL() policy.acl.add_user_grant('READ', oai.s3_user_id) object.set_acl(policy) else: object.set_canned_acl('public-read') def set_permissions_all(self, replace=False): """ Sets the S3 ACL grants for all objects in the Distribution to the appropriate value based on the type of Distribution. :type replace: bool :param replace: If False, the Origin Access Identity will be appended to the existing ACL for the object. If True, the ACL for the object will be completely replaced with one that grants READ permission to the Origin Access Identity. """ bucket = self._get_bucket() for key in bucket: self.set_permissions(key, replace) def add_object(self, name, content, headers=None, replace=True): """ Adds a new content object to the Distribution. The content for the object will be copied to a new Key in the S3 Bucket and the permissions will be set appropriately for the type of Distribution. :type name: str or unicode :param name: The name or key of the new object. :type content: file-like object :param content: A file-like object that contains the content for the new object. :type headers: dict :param headers: A dictionary containing additional headers you would like associated with the new object in S3. :rtype: :class:`boto.cloudfront.object.Object` :return: The newly created object. """ if self.config.origin.origin_access_identity: policy = 'private' else: policy = 'public-read' bucket = self._get_bucket() object = bucket.new_key(name) object.set_contents_from_file(content, headers=headers, policy=policy) if self.config.origin.origin_access_identity: self.set_permissions(object, replace) return object def create_signed_url(self, url, keypair_id, expire_time=None, valid_after_time=None, ip_address=None, policy_url=None, private_key_file=None, private_key_string=None): """ Creates a signed CloudFront URL that is only valid within the specified parameters. :type url: str :param url: The URL of the protected object. :type keypair_id: str :param keypair_id: The keypair ID of the Amazon KeyPair used to sign theURL. This ID MUST correspond to the private key specified with private_key_file or private_key_string. :type expire_time: int :param expire_time: The expiry time of the URL. If provided, the URL will expire after the time has passed. If not provided the URL will never expire. Format is a unix epoch. Use time.time() + duration_in_sec. :type valid_after_time: int :param valid_after_time: If provided, the URL will not be valid until after valid_after_time. Format is a unix epoch. Use time.time() + secs_until_valid. :type ip_address: str :param ip_address: If provided, only allows access from the specified IP address. Use '192.168.0.10' for a single IP or use '192.168.0.0/24' CIDR notation for a subnet. :type policy_url: str :param policy_url: If provided, allows the signature to contain wildcard globs in the URL. For example, you could provide: 'http://example.com/media/*' and the policy and signature would allow access to all contents of the media subdirectory. If not specified, only allow access to the exact url provided in 'url'. :type private_key_file: str or file object. :param private_key_file: If provided, contains the filename of the private key file used for signing or an open file object containing the private key contents. Only one of private_key_file or private_key_string can be provided. :type private_key_string: str :param private_key_string: If provided, contains the private key string used for signing. Only one of private_key_file or private_key_string can be provided. :rtype: str :return: The signed URL. """ # Get the required parameters params = self._create_signing_params( url=url, keypair_id=keypair_id, expire_time=expire_time, valid_after_time=valid_after_time, ip_address=ip_address, policy_url=policy_url, private_key_file=private_key_file, private_key_string=private_key_string) #combine these into a full url if "?" in url: sep = "&" else: sep = "?" signed_url_params = [] for key in ["Expires", "Policy", "Signature", "Key-Pair-Id"]: if key in params: param = "%s=%s" % (key, params[key]) signed_url_params.append(param) signed_url = url + sep + "&".join(signed_url_params) return signed_url def _create_signing_params(self, url, keypair_id, expire_time=None, valid_after_time=None, ip_address=None, policy_url=None, private_key_file=None, private_key_string=None): """ Creates the required URL parameters for a signed URL. """ params = {} # Check if we can use a canned policy if expire_time and not valid_after_time and not ip_address and not policy_url: # we manually construct this policy string to ensure formatting # matches signature policy = self._canned_policy(url, expire_time) params["Expires"] = str(expire_time) else: # If no policy_url is specified, default to the full url. if policy_url is None: policy_url = url # Can't use canned policy policy = self._custom_policy(policy_url, expires=None, valid_after=None, ip_address=None) encoded_policy = self._url_base64_encode(policy) params["Policy"] = encoded_policy #sign the policy signature = self._sign_string(policy, private_key_file, private_key_string) #now base64 encode the signature (URL safe as well) encoded_signature = self._url_base64_encode(signature) params["Signature"] = encoded_signature params["Key-Pair-Id"] = keypair_id return params @staticmethod def _canned_policy(resource, expires): """ Creates a canned policy string. """ policy = ('{"Statement":[{"Resource":"%(resource)s",' '"Condition":{"DateLessThan":{"AWS:EpochTime":' '%(expires)s}}}]}' % locals()) return policy @staticmethod def _custom_policy(resource, expires=None, valid_after=None, ip_address=None): """ Creates a custom policy string based on the supplied parameters. """ condition = {} if expires: condition["DateLessThan"] = {"AWS:EpochTime": expires} if valid_after: condition["DateGreaterThan"] = {"AWS:EpochTime": valid_after} if ip_address: if '/' not in ip_address: ip_address += "/32" condition["IpAddress"] = {"AWS:SourceIp": ip_address} policy = {"Statement": [{ "Resource": resource, "Condition": condition}]} return json.dumps(policy, separators=(",", ":")) @staticmethod def _sign_string(message, private_key_file=None, private_key_string=None): """ Signs a string for use with Amazon CloudFront. Requires the M2Crypto library be installed. """ try: from M2Crypto import EVP except ImportError: raise NotImplementedError("Boto depends on the python M2Crypto " "library to generate signed URLs for " "CloudFront") # Make sure only one of private_key_file and private_key_string is set if private_key_file and private_key_string: raise ValueError("Only specify the private_key_file or the private_key_string not both") if not private_key_file and not private_key_string: raise ValueError("You must specify one of private_key_file or private_key_string") # if private_key_file is a file object read the key string from there if isinstance(private_key_file, file): private_key_string = private_key_file.read() # Now load key and calculate signature if private_key_string: key = EVP.load_key_string(private_key_string) else: key = EVP.load_key(private_key_file) key.reset_context(md='sha1') key.sign_init() key.sign_update(str(message)) signature = key.sign_final() return signature @staticmethod def _url_base64_encode(msg): """ Base64 encodes a string using the URL-safe characters specified by Amazon. """ msg_base64 = base64.b64encode(msg) msg_base64 = msg_base64.replace('+', '-') msg_base64 = msg_base64.replace('=', '_') msg_base64 = msg_base64.replace('/', '~') return msg_base64 class StreamingDistribution(Distribution): def __init__(self, connection=None, config=None, domain_name='', id='', last_modified_time=None, status=''): Distribution.__init__(self, connection, config, domain_name, id, last_modified_time, status) self._object_class = StreamingObject def startElement(self, name, attrs, connection): if name == 'StreamingDistributionConfig': self.config = StreamingDistributionConfig() return self.config else: return Distribution.startElement(self, name, attrs, connection) def update(self, enabled=None, cnames=None, comment=None): """ Update the configuration of the StreamingDistribution. The only values of the StreamingDistributionConfig that can be directly updated are: * CNAMES * Comment * Whether the Distribution is enabled or not Any changes to the ``trusted_signers`` or ``origin`` properties of this distribution's current config object will also be included in the update. Therefore, to set the origin access identity for this distribution, set ``StreamingDistribution.config.origin.origin_access_identity`` before calling this update method. :type enabled: bool :param enabled: Whether the StreamingDistribution is active or not. :type cnames: list of str :param cnames: The DNS CNAME's associated with this Distribution. Maximum of 10 values. :type comment: str or unicode :param comment: The comment associated with the Distribution. """ new_config = StreamingDistributionConfig(self.connection, self.config.origin, self.config.enabled, self.config.caller_reference, self.config.cnames, self.config.comment, self.config.trusted_signers) if enabled != None: new_config.enabled = enabled if cnames != None: new_config.cnames = cnames if comment != None: new_config.comment = comment self.etag = self.connection.set_streaming_distribution_config(self.id, self.etag, new_config) self.config = new_config self._object_class = StreamingObject def delete(self): self.connection.delete_streaming_distribution(self.id, self.etag) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/cloudfront/exception.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.exception import BotoServerError class CloudFrontServerError(BotoServerError): pass ================================================ FILE: deploy/third_party/boto-2.1.1/boto/cloudfront/identity.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import uuid class OriginAccessIdentity: def __init__(self, connection=None, config=None, id='', s3_user_id='', comment=''): self.connection = connection self.config = config self.id = id self.s3_user_id = s3_user_id self.comment = comment self.etag = None def startElement(self, name, attrs, connection): if name == 'CloudFrontOriginAccessIdentityConfig': self.config = OriginAccessIdentityConfig() return self.config else: return None def endElement(self, name, value, connection): if name == 'Id': self.id = value elif name == 'S3CanonicalUserId': self.s3_user_id = value elif name == 'Comment': self.comment = value else: setattr(self, name, value) def update(self, comment=None): new_config = OriginAccessIdentityConfig(self.connection, self.config.caller_reference, self.config.comment) if comment != None: new_config.comment = comment self.etag = self.connection.set_origin_identity_config(self.id, self.etag, new_config) self.config = new_config def delete(self): return self.connection.delete_origin_access_identity(self.id, self.etag) def uri(self): return 'origin-access-identity/cloudfront/%s' % self.id class OriginAccessIdentityConfig: def __init__(self, connection=None, caller_reference='', comment=''): self.connection = connection if caller_reference: self.caller_reference = caller_reference else: self.caller_reference = str(uuid.uuid4()) self.comment = comment def to_xml(self): s = '\n' s += '\n' s += ' %s\n' % self.caller_reference if self.comment: s += ' %s\n' % self.comment s += '\n' return s def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'Comment': self.comment = value elif name == 'CallerReference': self.caller_reference = value else: setattr(self, name, value) class OriginAccessIdentitySummary: def __init__(self, connection=None, id='', s3_user_id='', comment=''): self.connection = connection self.id = id self.s3_user_id = s3_user_id self.comment = comment self.etag = None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'Id': self.id = value elif name == 'S3CanonicalUserId': self.s3_user_id = value elif name == 'Comment': self.comment = value else: setattr(self, name, value) def get_origin_access_identity(self): return self.connection.get_origin_access_identity_info(self.id) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/cloudfront/invalidation.py ================================================ # Copyright (c) 2006-2010 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import uuid import urllib class InvalidationBatch(object): """A simple invalidation request. :see: http://docs.amazonwebservices.com/AmazonCloudFront/2010-08-01/APIReference/index.html?InvalidationBatchDatatype.html """ def __init__(self, paths=None, connection=None, distribution=None, caller_reference=''): """Create a new invalidation request: :paths: An array of paths to invalidate """ self.paths = paths or [] self.distribution = distribution self.caller_reference = caller_reference if not self.caller_reference: self.caller_reference = str(uuid.uuid4()) # If we passed in a distribution, # then we use that as the connection object if distribution: self.connection = connection else: self.connection = connection def add(self, path): """Add another path to this invalidation request""" return self.paths.append(path) def remove(self, path): """Remove a path from this invalidation request""" return self.paths.remove(path) def __iter__(self): return iter(self.paths) def __getitem__(self, i): return self.paths[i] def __setitem__(self, k, v): self.paths[k] = v def escape(self, p): """Escape a path, make sure it begins with a slash and contains no invalid characters""" if not p[0] == "/": p = "/%s" % p return urllib.quote(p) def to_xml(self): """Get this batch as XML""" assert self.connection != None s = '\n' s += '\n' % self.connection.Version for p in self.paths: s += ' %s\n' % self.escape(p) s += ' %s\n' % self.caller_reference s += '\n' return s def startElement(self, name, attrs, connection): if name == "InvalidationBatch": self.paths = [] return None def endElement(self, name, value, connection): if name == 'Path': self.paths.append(value) elif name == "Status": self.status = value elif name == "Id": self.id = value elif name == "CreateTime": self.create_time = value elif name == "CallerReference": self.caller_reference = value return None ================================================ FILE: deploy/third_party/boto-2.1.1/boto/cloudfront/logging.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class LoggingInfo(object): def __init__(self, bucket='', prefix=''): self.bucket = bucket self.prefix = prefix def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'Bucket': self.bucket = value elif name == 'Prefix': self.prefix = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/cloudfront/object.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.s3.key import Key class Object(Key): def __init__(self, bucket, name=None): Key.__init__(self, bucket, name=name) self.distribution = bucket.distribution def __repr__(self): return '' % (self.distribution.config.origin, self.name) def url(self, scheme='http'): url = '%s://' % scheme url += self.distribution.domain_name if scheme.lower().startswith('rtmp'): url += '/cfx/st/' else: url += '/' url += self.name return url class StreamingObject(Object): def url(self, scheme='rtmp'): return Object.url(self, scheme) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/cloudfront/origin.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from identity import OriginAccessIdentity def get_oai_value(origin_access_identity): if isinstance(origin_access_identity, OriginAccessIdentity): return origin_access_identity.uri() else: return origin_access_identity class S3Origin(object): """ Origin information to associate with the distribution. If your distribution will use an Amazon S3 origin, then you use the S3Origin element. """ def __init__(self, dns_name=None, origin_access_identity=None): """ :param dns_name: The DNS name of your Amazon S3 bucket to associate with the distribution. For example: mybucket.s3.amazonaws.com. :type dns_name: str :param origin_access_identity: The CloudFront origin access identity to associate with the distribution. If you want the distribution to serve private content, include this element; if you want the distribution to serve public content, remove this element. :type origin_access_identity: str """ self.dns_name = dns_name self.origin_access_identity = origin_access_identity def __repr__(self): return '' % self.dns_name def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'DNSName': self.dns_name = value elif name == 'OriginAccessIdentity': self.origin_access_identity = value else: setattr(self, name, value) def to_xml(self): s = ' \n' s += ' %s\n' % self.dns_name if self.origin_access_identity: val = get_oai_value(self.origin_access_identity) s += ' %s\n' % val s += ' \n' return s class CustomOrigin(object): """ Origin information to associate with the distribution. If your distribution will use a non-Amazon S3 origin, then you use the CustomOrigin element. """ def __init__(self, dns_name=None, http_port=80, https_port=443, origin_protocol_policy=None): """ :param dns_name: The DNS name of your Amazon S3 bucket to associate with the distribution. For example: mybucket.s3.amazonaws.com. :type dns_name: str :param http_port: The HTTP port the custom origin listens on. :type http_port: int :param https_port: The HTTPS port the custom origin listens on. :type http_port: int :param origin_protocol_policy: The origin protocol policy to apply to your origin. If you specify http-only, CloudFront will use HTTP only to access the origin. If you specify match-viewer, CloudFront will fetch from your origin using HTTP or HTTPS, based on the protocol of the viewer request. :type origin_protocol_policy: str """ self.dns_name = dns_name self.http_port = http_port self.https_port = https_port self.origin_protocol_policy = origin_protocol_policy def __repr__(self): return '' % self.dns_name def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'DNSName': self.dns_name = value elif name == 'HTTPPort': try: self.http_port = int(value) except ValueError: self.http_port = value elif name == 'HTTPSPort': try: self.https_port = int(value) except ValueError: self.https_port = value elif name == 'OriginProtocolPolicy': self.origin_protocol_policy = value else: setattr(self, name, value) def to_xml(self): s = ' \n' s += ' %s\n' % self.dns_name s += ' %d\n' % self.http_port s += ' %d\n' % self.https_port s += ' %s\n' % self.origin_protocol_policy s += ' \n' return s ================================================ FILE: deploy/third_party/boto-2.1.1/boto/cloudfront/signers.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class Signer: def __init__(self): self.id = None self.key_pair_ids = [] def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'Self': self.id = 'Self' elif name == 'AwsAccountNumber': self.id = value elif name == 'KeyPairId': self.key_pair_ids.append(value) class ActiveTrustedSigners(list): def startElement(self, name, attrs, connection): if name == 'Signer': s = Signer() self.append(s) return s def endElement(self, name, value, connection): pass class TrustedSigners(list): def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'Self': self.append(name) elif name == 'AwsAccountNumber': self.append(value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/connection.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010 Google # Copyright (c) 2008 rPath, Inc. # Copyright (c) 2009 The Echo Nest Corporation # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2011, Nexenta Systems Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # # Parts of this code were copied or derived from sample code supplied by AWS. # The following notice applies to that code. # # This software code is made available "AS IS" without warranties of any # kind. You may copy, display, modify and redistribute the software # code either by itself or as incorporated into your code; provided that # you do not remove any proprietary notices. Your use of this software # code is at your own risk and you waive any claim against Amazon # Digital Services, Inc. or its affiliates with respect to your use of # this software code. (c) 2006 Amazon Digital Services, Inc. or its # affiliates. """ Handles basic connections to AWS """ from __future__ import with_statement import base64 import errno import httplib import os import Queue import random import re import socket import sys import time import urllib, urlparse import xml.sax import auth import auth_handler import boto import boto.utils import boto.handler import boto.cacerts from boto import config, UserAgent from boto.exception import AWSConnectionError, BotoClientError, BotoServerError from boto.provider import Provider from boto.resultset import ResultSet HAVE_HTTPS_CONNECTION = False try: import ssl from boto import https_connection # Google App Engine runs on Python 2.5 so doesn't have ssl.SSLError. if hasattr(ssl, 'SSLError'): HAVE_HTTPS_CONNECTION = True except ImportError: pass try: import threading except ImportError: import dummy_threading as threading ON_APP_ENGINE = all(key in os.environ for key in ( 'USER_IS_ADMIN', 'CURRENT_VERSION_ID', 'APPLICATION_ID')) PORTS_BY_SECURITY = { True: 443, False: 80 } DEFAULT_CA_CERTS_FILE = os.path.join( os.path.dirname(os.path.abspath(boto.cacerts.__file__ )), "cacerts.txt") class HostConnectionPool(object): """ A pool of connections for one remote (host,is_secure). When connections are added to the pool, they are put into a pending queue. The _mexe method returns connections to the pool before the response body has been read, so they connections aren't ready to send another request yet. They stay in the pending queue until they are ready for another request, at which point they are returned to the pool of ready connections. The pool of ready connections is an ordered list of (connection,time) pairs, where the time is the time the connection was returned from _mexe. After a certain period of time, connections are considered stale, and discarded rather than being reused. This saves having to wait for the connection to time out if AWS has decided to close it on the other end because of inactivity. Thread Safety: This class is used only fram ConnectionPool while it's mutex is held. """ def __init__(self): self.queue = [] def size(self): """ Returns the number of connections in the pool for this host. Some of the connections may still be in use, and may not be ready to be returned by get(). """ return len(self.queue) def put(self, conn): """ Adds a connection to the pool, along with the time it was added. """ self.queue.append((conn, time.time())) def get(self): """ Returns the next connection in this pool that is ready to be reused. Returns None of there aren't any. """ # Discard ready connections that are too old. self.clean() # Return the first connection that is ready, and remove it # from the queue. Connections that aren't ready are returned # to the end of the queue with an updated time, on the # assumption that somebody is actively reading the response. for _ in range(len(self.queue)): (conn, _) = self.queue.pop(0) if self._conn_ready(conn): return conn else: self.put(conn) return None def _conn_ready(self, conn): """ There is a nice state diagram at the top of httplib.py. It indicates that once the response headers have been read (which _mexe does before adding the connection to the pool), a response is attached to the connection, and it stays there until it's done reading. This isn't entirely true: even after the client is done reading, the response may be closed, but not removed from the connection yet. This is ugly, reading a private instance variable, but the state we care about isn't available in any public methods. """ if ON_APP_ENGINE: # Google App Engine implementation of HTTPConnection doesn't contain # _HTTPConnection__response attribute. Moreover, it's not possible # to determine if given connection is ready. Reusing connections # simply doesn't make sense with App Engine urlfetch service. return False else: response = conn._HTTPConnection__response return (response is None) or response.isclosed() def clean(self): """ Get rid of stale connections. """ # Note that we do not close the connection here -- somebody # may still be reading from it. while len(self.queue) > 0 and self._pair_stale(self.queue[0]): self.queue.pop(0) def _pair_stale(self, pair): """ Returns true of the (connection,time) pair is too old to be used. """ (_conn, return_time) = pair now = time.time() return return_time + ConnectionPool.STALE_DURATION < now class ConnectionPool(object): """ A connection pool that expires connections after a fixed period of time. This saves time spent waiting for a connection that AWS has timed out on the other end. This class is thread-safe. """ # # The amout of time between calls to clean. # CLEAN_INTERVAL = 5.0 # # How long before a connection becomes "stale" and won't be reused # again. The intention is that this time is less that the timeout # period that AWS uses, so we'll never try to reuse a connection # and find that AWS is timing it out. # # Experimentation in July 2011 shows that AWS starts timing things # out after three minutes. The 60 seconds here is conservative so # we should never hit that 3-minute timout. # STALE_DURATION = 60.0 def __init__(self): # Mapping from (host,is_secure) to HostConnectionPool. # If a pool becomes empty, it is removed. self.host_to_pool = {} # The last time the pool was cleaned. self.last_clean_time = 0.0 self.mutex = threading.Lock() def size(self): """ Returns the number of connections in the pool. """ return sum(pool.size() for pool in self.host_to_pool.values()) def get_http_connection(self, host, is_secure): """ Gets a connection from the pool for the named host. Returns None if there is no connection that can be reused. """ self.clean() with self.mutex: key = (host, is_secure) if key not in self.host_to_pool: return None return self.host_to_pool[key].get() def put_http_connection(self, host, is_secure, conn): """ Adds a connection to the pool of connections that can be reused for the named host. """ with self.mutex: key = (host, is_secure) if key not in self.host_to_pool: self.host_to_pool[key] = HostConnectionPool() self.host_to_pool[key].put(conn) def clean(self): """ Clean up the stale connections in all of the pools, and then get rid of empty pools. Pools clean themselves every time a connection is fetched; this cleaning takes care of pools that aren't being used any more, so nothing is being gotten from them. """ with self.mutex: now = time.time() if self.last_clean_time + self.CLEAN_INTERVAL < now: to_remove = [] for (host, pool) in self.host_to_pool.items(): pool.clean() if pool.size() == 0: to_remove.append(host) for host in to_remove: del self.host_to_pool[host] self.last_clean_time = now class HTTPRequest(object): def __init__(self, method, protocol, host, port, path, auth_path, params, headers, body): """Represents an HTTP request. :type method: string :param method: The HTTP method name, 'GET', 'POST', 'PUT' etc. :type protocol: string :param protocol: The http protocol used, 'http' or 'https'. :type host: string :param host: Host to which the request is addressed. eg. abc.com :type port: int :param port: port on which the request is being sent. Zero means unset, in which case default port will be chosen. :type path: string :param path: URL path that is bein accessed. :type auth_path: string :param path: The part of the URL path used when creating the authentication string. :type params: dict :param params: HTTP url query parameters, with key as name of the param, and value as value of param. :type headers: dict :param headers: HTTP headers, with key as name of the header and value as value of header. :type body: string :param body: Body of the HTTP request. If not present, will be None or empty string (''). """ self.method = method self.protocol = protocol self.host = host self.port = port self.path = path if auth_path is None: auth_path = path self.auth_path = auth_path self.params = params # chunked Transfer-Encoding should act only on PUT request. if headers and 'Transfer-Encoding' in headers and \ headers['Transfer-Encoding'] == 'chunked' and \ self.method != 'PUT': self.headers = headers.copy() del self.headers['Transfer-Encoding'] else: self.headers = headers self.body = body def __str__(self): return (('method:(%s) protocol:(%s) host(%s) port(%s) path(%s) ' 'params(%s) headers(%s) body(%s)') % (self.method, self.protocol, self.host, self.port, self.path, self.params, self.headers, self.body)) def authorize(self, connection, **kwargs): for key in self.headers: val = self.headers[key] if isinstance(val, unicode): self.headers[key] = urllib.quote_plus(val.encode('utf-8')) connection._auth_handler.add_auth(self, **kwargs) self.headers['User-Agent'] = UserAgent # I'm not sure if this is still needed, now that add_auth is # setting the content-length for POST requests. if not self.headers.has_key('Content-Length'): if not self.headers.has_key('Transfer-Encoding') or \ self.headers['Transfer-Encoding'] != 'chunked': self.headers['Content-Length'] = str(len(self.body)) class AWSAuthConnection(object): def __init__(self, host, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, path='/', provider='aws', security_token=None): """ :type host: str :param host: The host to make the connection to :keyword str aws_access_key_id: Your AWS Access Key ID (provided by Amazon). If none is specified, the value in your ``AWS_ACCESS_KEY_ID`` environmental variable is used. :keyword str aws_secret_access_key: Your AWS Secret Access Key (provided by Amazon). If none is specified, the value in your ``AWS_SECRET_ACCESS_KEY`` environmental variable is used. :type is_secure: boolean :param is_secure: Whether the connection is over SSL :type https_connection_factory: list or tuple :param https_connection_factory: A pair of an HTTP connection factory and the exceptions to catch. The factory should have a similar interface to L{httplib.HTTPSConnection}. :param str proxy: Address/hostname for a proxy server :type proxy_port: int :param proxy_port: The port to use when connecting over a proxy :type proxy_user: str :param proxy_user: The username to connect with on the proxy :type proxy_pass: str :param proxy_pass: The password to use when connection over a proxy. :type port: int :param port: The port to use to connect """ self.num_retries = 6 # Override passed-in is_secure setting if value was defined in config. if config.has_option('Boto', 'is_secure'): is_secure = config.getboolean('Boto', 'is_secure') self.is_secure = is_secure # Whether or not to validate server certificates. At some point in the # future, the default should be flipped to true. self.https_validate_certificates = config.getbool( 'Boto', 'https_validate_certificates', False) if self.https_validate_certificates and not HAVE_HTTPS_CONNECTION: raise BotoClientError( "SSL server certificate validation is enabled in boto " "configuration, but Python dependencies required to " "support this feature are not available. Certificate " "validation is only supported when running under Python " "2.6 or later.") self.ca_certificates_file = config.get_value( 'Boto', 'ca_certificates_file', DEFAULT_CA_CERTS_FILE) self.handle_proxy(proxy, proxy_port, proxy_user, proxy_pass) # define exceptions from httplib that we want to catch and retry self.http_exceptions = (httplib.HTTPException, socket.error, socket.gaierror) # define subclasses of the above that are not retryable. self.http_unretryable_exceptions = [] if HAVE_HTTPS_CONNECTION: self.http_unretryable_exceptions.append(ssl.SSLError) self.http_unretryable_exceptions.append( https_connection.InvalidCertificateException) # define values in socket exceptions we don't want to catch self.socket_exception_values = (errno.EINTR,) if https_connection_factory is not None: self.https_connection_factory = https_connection_factory[0] self.http_exceptions += https_connection_factory[1] else: self.https_connection_factory = None if (is_secure): self.protocol = 'https' else: self.protocol = 'http' self.host = host self.path = path if debug: self.debug = debug else: self.debug = config.getint('Boto', 'debug', debug) if port: self.port = port else: self.port = PORTS_BY_SECURITY[is_secure] # Timeout used to tell httplib how long to wait for socket timeouts. # Default is to leave timeout unchanged, which will in turn result in # the socket's default global timeout being used. To specify a # timeout, set http_socket_timeout in Boto config. Regardless, # timeouts will only be applied if Python is 2.6 or greater. self.http_connection_kwargs = {} if (sys.version_info[0], sys.version_info[1]) >= (2, 6): if config.has_option('Boto', 'http_socket_timeout'): timeout = config.getint('Boto', 'http_socket_timeout') self.http_connection_kwargs['timeout'] = timeout self.provider = Provider(provider, aws_access_key_id, aws_secret_access_key, security_token) # allow config file to override default host if self.provider.host: self.host = self.provider.host self._pool = ConnectionPool() self._connection = (self.server_name(), self.is_secure) self._last_rs = None self._auth_handler = auth.get_auth_handler( host, config, self.provider, self._required_auth_capability()) def __repr__(self): return '%s:%s' % (self.__class__.__name__, self.host) def _required_auth_capability(self): return [] def connection(self): return self.get_http_connection(*self._connection) connection = property(connection) def aws_access_key_id(self): return self.provider.access_key aws_access_key_id = property(aws_access_key_id) gs_access_key_id = aws_access_key_id access_key = aws_access_key_id def aws_secret_access_key(self): return self.provider.secret_key aws_secret_access_key = property(aws_secret_access_key) gs_secret_access_key = aws_secret_access_key secret_key = aws_secret_access_key def get_path(self, path='/'): pos = path.find('?') if pos >= 0: params = path[pos:] path = path[:pos] else: params = None if path[-1] == '/': need_trailing = True else: need_trailing = False path_elements = self.path.split('/') path_elements.extend(path.split('/')) path_elements = [p for p in path_elements if p] path = '/' + '/'.join(path_elements) if path[-1] != '/' and need_trailing: path += '/' if params: path = path + params return path def server_name(self, port=None): if not port: port = self.port if port == 80: signature_host = self.host else: # This unfortunate little hack can be attributed to # a difference in the 2.6 version of httplib. In old # versions, it would append ":443" to the hostname sent # in the Host header and so we needed to make sure we # did the same when calculating the V2 signature. In 2.6 # (and higher!) # it no longer does that. Hence, this kludge. if ((ON_APP_ENGINE and sys.version[:3] == '2.5') or sys.version[:3] in ('2.6', '2.7')) and port == 443: signature_host = self.host else: signature_host = '%s:%d' % (self.host, port) return signature_host def handle_proxy(self, proxy, proxy_port, proxy_user, proxy_pass): self.proxy = proxy self.proxy_port = proxy_port self.proxy_user = proxy_user self.proxy_pass = proxy_pass if os.environ.has_key('http_proxy') and not self.proxy: pattern = re.compile( '(?:http://)?' \ '(?:(?P\w+):(?P.*)@)?' \ '(?P[\w\-\.]+)' \ '(?::(?P\d+))?' ) match = pattern.match(os.environ['http_proxy']) if match: self.proxy = match.group('host') self.proxy_port = match.group('port') self.proxy_user = match.group('user') self.proxy_pass = match.group('pass') else: if not self.proxy: self.proxy = config.get_value('Boto', 'proxy', None) if not self.proxy_port: self.proxy_port = config.get_value('Boto', 'proxy_port', None) if not self.proxy_user: self.proxy_user = config.get_value('Boto', 'proxy_user', None) if not self.proxy_pass: self.proxy_pass = config.get_value('Boto', 'proxy_pass', None) if not self.proxy_port and self.proxy: print "http_proxy environment variable does not specify " \ "a port, using default" self.proxy_port = self.port self.use_proxy = (self.proxy != None) def get_http_connection(self, host, is_secure): conn = self._pool.get_http_connection(host, is_secure) if conn is not None: return conn else: return self.new_http_connection(host, is_secure) def new_http_connection(self, host, is_secure): if self.use_proxy: host = '%s:%d' % (self.proxy, int(self.proxy_port)) if host is None: host = self.server_name() if is_secure: boto.log.debug( 'establishing HTTPS connection: host=%s, kwargs=%s', host, self.http_connection_kwargs) if self.use_proxy: connection = self.proxy_ssl() elif self.https_connection_factory: connection = self.https_connection_factory(host) elif self.https_validate_certificates and HAVE_HTTPS_CONNECTION: connection = https_connection.CertValidatingHTTPSConnection( host, ca_certs=self.ca_certificates_file, **self.http_connection_kwargs) else: connection = httplib.HTTPSConnection(host, **self.http_connection_kwargs) else: boto.log.debug('establishing HTTP connection: kwargs=%s' % self.http_connection_kwargs) connection = httplib.HTTPConnection(host, **self.http_connection_kwargs) if self.debug > 1: connection.set_debuglevel(self.debug) # self.connection must be maintained for backwards-compatibility # however, it must be dynamically pulled from the connection pool # set a private variable which will enable that if host.split(':')[0] == self.host and is_secure == self.is_secure: self._connection = (host, is_secure) return connection def put_http_connection(self, host, is_secure, connection): self._pool.put_http_connection(host, is_secure, connection) def proxy_ssl(self): host = '%s:%d' % (self.host, self.port) sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: sock.connect((self.proxy, int(self.proxy_port))) except: raise boto.log.debug("Proxy connection: CONNECT %s HTTP/1.0\r\n", host) sock.sendall("CONNECT %s HTTP/1.0\r\n" % host) sock.sendall("User-Agent: %s\r\n" % UserAgent) if self.proxy_user and self.proxy_pass: for k, v in self.get_proxy_auth_header().items(): sock.sendall("%s: %s\r\n" % (k, v)) sock.sendall("\r\n") resp = httplib.HTTPResponse(sock, strict=True, debuglevel=self.debug) resp.begin() if resp.status != 200: # Fake a socket error, use a code that make it obvious it hasn't # been generated by the socket library raise socket.error(-71, "Error talking to HTTP proxy %s:%s: %s (%s)" % (self.proxy, self.proxy_port, resp.status, resp.reason)) # We can safely close the response, it duped the original socket resp.close() h = httplib.HTTPConnection(host) if self.https_validate_certificates and HAVE_HTTPS_CONNECTION: boto.log.debug("wrapping ssl socket for proxied connection; " "CA certificate file=%s", self.ca_certificates_file) key_file = self.http_connection_kwargs.get('key_file', None) cert_file = self.http_connection_kwargs.get('cert_file', None) sslSock = ssl.wrap_socket(sock, keyfile=key_file, certfile=cert_file, cert_reqs=ssl.CERT_REQUIRED, ca_certs=self.ca_certificates_file) cert = sslSock.getpeercert() hostname = self.host.split(':', 0)[0] if not https_connection.ValidateCertificateHostname(cert, hostname): raise https_connection.InvalidCertificateException( hostname, cert, 'hostname mismatch') else: # Fallback for old Python without ssl.wrap_socket if hasattr(httplib, 'ssl'): sslSock = httplib.ssl.SSLSocket(sock) else: sslSock = socket.ssl(sock, None, None) sslSock = httplib.FakeSocket(sock, sslSock) # This is a bit unclean h.sock = sslSock return h def prefix_proxy_to_path(self, path, host=None): path = self.protocol + '://' + (host or self.server_name()) + path return path def get_proxy_auth_header(self): auth = base64.encodestring(self.proxy_user + ':' + self.proxy_pass) return {'Proxy-Authorization': 'Basic %s' % auth} def _mexe(self, request, sender=None, override_num_retries=None): """ mexe - Multi-execute inside a loop, retrying multiple times to handle transient Internet errors by simply trying again. Also handles redirects. This code was inspired by the S3Utils classes posted to the boto-users Google group by Larry Bates. Thanks! """ boto.log.debug('Method: %s' % request.method) boto.log.debug('Path: %s' % request.path) boto.log.debug('Data: %s' % request.body) boto.log.debug('Headers: %s' % request.headers) boto.log.debug('Host: %s' % request.host) response = None body = None e = None if override_num_retries is None: num_retries = config.getint('Boto', 'num_retries', self.num_retries) else: num_retries = override_num_retries i = 0 connection = self.get_http_connection(request.host, self.is_secure) while i <= num_retries: # Use binary exponential backoff to desynchronize client requests next_sleep = random.random() * (2 ** i) try: # we now re-sign each request before it is retried request.authorize(connection=self) if callable(sender): response = sender(connection, request.method, request.path, request.body, request.headers) else: connection.request(request.method, request.path, request.body, request.headers) response = connection.getresponse() location = response.getheader('location') # -- gross hack -- # httplib gets confused with chunked responses to HEAD requests # so I have to fake it out if request.method == 'HEAD' and getattr(response, 'chunked', False): response.chunked = 0 if response.status == 500 or response.status == 503: boto.log.debug('received %d response, retrying in %3.1f seconds' % (response.status, next_sleep)) body = response.read() elif response.status < 300 or response.status >= 400 or \ not location: self.put_http_connection(request.host, self.is_secure, connection) return response else: scheme, request.host, request.path, params, query, fragment = \ urlparse.urlparse(location) if query: request.path += '?' + query boto.log.debug('Redirecting: %s' % scheme + '://' + request.host + request.path) connection = self.get_http_connection(request.host, scheme == 'https') continue except self.http_exceptions, e: for unretryable in self.http_unretryable_exceptions: if isinstance(e, unretryable): boto.log.debug( 'encountered unretryable %s exception, re-raising' % e.__class__.__name__) raise e boto.log.debug('encountered %s exception, reconnecting' % \ e.__class__.__name__) connection = self.new_http_connection(request.host, self.is_secure) time.sleep(next_sleep) i += 1 # If we made it here, it's because we have exhausted our retries and stil haven't # succeeded. So, if we have a response object, use it to raise an exception. # Otherwise, raise the exception that must have already happened. if response: raise BotoServerError(response.status, response.reason, body) elif e: raise e else: raise BotoClientError('Please report this exception as a Boto Issue!') def build_base_http_request(self, method, path, auth_path, params=None, headers=None, data='', host=None): path = self.get_path(path) if auth_path is not None: auth_path = self.get_path(auth_path) if params == None: params = {} else: params = params.copy() if headers == None: headers = {} else: headers = headers.copy() host = host or self.host if self.use_proxy: if not auth_path: auth_path = path path = self.prefix_proxy_to_path(path, host) if self.proxy_user and self.proxy_pass and not self.is_secure: # If is_secure, we don't have to set the proxy authentication # header here, we did that in the CONNECT to the proxy. headers.update(self.get_proxy_auth_header()) return HTTPRequest(method, self.protocol, host, self.port, path, auth_path, params, headers, data) def make_request(self, method, path, headers=None, data='', host=None, auth_path=None, sender=None, override_num_retries=None): """Makes a request to the server, with stock multiple-retry logic.""" http_request = self.build_base_http_request(method, path, auth_path, {}, headers, data, host) return self._mexe(http_request, sender, override_num_retries) def close(self): """(Optional) Close any open HTTP connections. This is non-destructive, and making a new request will open a connection again.""" boto.log.debug('closing all HTTP connections') self.connection = None # compat field class AWSQueryConnection(AWSAuthConnection): APIVersion = '' ResponseError = BotoServerError def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, host=None, debug=0, https_connection_factory=None, path='/', security_token=None): AWSAuthConnection.__init__(self, host, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, debug, https_connection_factory, path, security_token=security_token) def _required_auth_capability(self): return [] def get_utf8_value(self, value): return boto.utils.get_utf8_value(value) def make_request(self, action, params=None, path='/', verb='GET'): http_request = self.build_base_http_request(verb, path, None, params, {}, '', self.server_name()) if action: http_request.params['Action'] = action http_request.params['Version'] = self.APIVersion return self._mexe(http_request) def build_list_params(self, params, items, label): if isinstance(items, str): items = [items] for i in range(1, len(items) + 1): params['%s.%d' % (label, i)] = items[i - 1] # generics def get_list(self, action, params, markers, path='/', parent=None, verb='GET'): if not parent: parent = self response = self.make_request(action, params, path, verb) body = response.read() boto.log.debug(body) if not body: boto.log.error('Null body %s' % body) raise self.ResponseError(response.status, response.reason, body) elif response.status == 200: rs = ResultSet(markers) h = boto.handler.XmlHandler(rs, parent) xml.sax.parseString(body, h) return rs else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def get_object(self, action, params, cls, path='/', parent=None, verb='GET'): if not parent: parent = self response = self.make_request(action, params, path, verb) body = response.read() boto.log.debug(body) if not body: boto.log.error('Null body %s' % body) raise self.ResponseError(response.status, response.reason, body) elif response.status == 200: obj = cls(parent) h = boto.handler.XmlHandler(obj, parent) xml.sax.parseString(body, h) return obj else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def get_status(self, action, params, path='/', parent=None, verb='GET'): if not parent: parent = self response = self.make_request(action, params, path, verb) body = response.read() boto.log.debug(body) if not body: boto.log.error('Null body %s' % body) raise self.ResponseError(response.status, response.reason, body) elif response.status == 200: rs = ResultSet() h = boto.handler.XmlHandler(rs, parent) xml.sax.parseString(body, h) return rs.status else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/contrib/__init__.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # ================================================ FILE: deploy/third_party/boto-2.1.1/boto/contrib/m2helpers.py ================================================ # Copyright (c) 2006,2007 Jon Colverson # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ This module was contributed by Jon Colverson. It provides a couple of helper functions that allow you to use M2Crypto's implementation of HTTPSConnection rather than the default version in httplib.py. The main benefit is that M2Crypto's version verifies the certificate of the server. To use this feature, do something like this: from boto.ec2.connection import EC2Connection ec2 = EC2Connection(ACCESS_KEY_ID, SECRET_ACCESS_KEY, https_connection_factory=https_connection_factory(cafile=CA_FILE)) See http://code.google.com/p/boto/issues/detail?id=57 for more details. """ from M2Crypto import SSL from M2Crypto.httpslib import HTTPSConnection def secure_context(cafile=None, capath=None): ctx = SSL.Context() ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, depth=9) if ctx.load_verify_locations(cafile=cafile, capath=capath) != 1: raise Exception("Couldn't load certificates") return ctx def https_connection_factory(cafile=None, capath=None): def factory(*args, **kwargs): return HTTPSConnection( ssl_context=secure_context(cafile=cafile, capath=capath), *args, **kwargs) return (factory, (SSL.SSLError,)) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/contrib/ymlmessage.py ================================================ # Copyright (c) 2006,2007 Chris Moyer # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ This module was contributed by Chris Moyer. It provides a subclass of the SQS Message class that supports YAML as the body of the message. This module requires the yaml module. """ from boto.sqs.message import Message import yaml class YAMLMessage(Message): """ The YAMLMessage class provides a YAML compatible message. Encoding and decoding are handled automaticaly. Access this message data like such: m.data = [ 1, 2, 3] m.data[0] # Returns 1 This depends on the PyYAML package """ def __init__(self, queue=None, body='', xml_attrs=None): self.data = None Message.__init__(self, queue, body) def set_body(self, body): self.data = yaml.load(body) def get_body(self): return yaml.dump(self.data) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/__init__.py ================================================ # Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # """ This module provides an interface to the Elastic Compute Cloud (EC2) service from AWS. """ from boto.ec2.connection import EC2Connection def regions(**kw_params): """ Get all available regions for the EC2 service. You may pass any of the arguments accepted by the EC2Connection object's constructor as keyword arguments and they will be passed along to the EC2Connection object. :rtype: list :return: A list of :class:`boto.ec2.regioninfo.RegionInfo` """ c = EC2Connection(**kw_params) return c.get_all_regions() def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.ec2.connection.EC2Connection`. Any additional parameters after the region_name are passed on to the connect method of the region object. :type: str :param region_name: The name of the region to connect to. :rtype: :class:`boto.ec2.connection.EC2Connection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ for region in regions(**kw_params): if region.name == region_name: return region.connect(**kw_params) return None def get_region(region_name, **kw_params): """ Find and return a :class:`boto.ec2.regioninfo.RegionInfo` object given a region name. :type: str :param: The name of the region. :rtype: :class:`boto.ec2.regioninfo.RegionInfo` :return: The RegionInfo object for the given region or None if an invalid region name is provided. """ for region in regions(**kw_params): if region.name == region_name: return region return None ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/address.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an EC2 Elastic IP Address """ from boto.ec2.ec2object import EC2Object class Address(EC2Object): def __init__(self, connection=None, public_ip=None, instance_id=None): EC2Object.__init__(self, connection) self.connection = connection self.public_ip = public_ip self.instance_id = instance_id self.domain = None self.allocation_id = None self.association_id = None def __repr__(self): return 'Address:%s' % self.public_ip def endElement(self, name, value, connection): if name == 'publicIp': self.public_ip = value elif name == 'instanceId': self.instance_id = value elif name == 'domain': self.domain = value elif name == 'allocationId': self.allocation_id = value elif name == 'associationId': self.association_id = value else: setattr(self, name, value) def release(self): return self.connection.release_address(self.public_ip) delete = release def associate(self, instance_id): return self.connection.associate_address(instance_id, self.public_ip) def disassociate(self): return self.connection.disassociate_address(self.public_ip) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/autoscale/__init__.py ================================================ # Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/ # Copyright (c) 2011 Jann Kleen # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ This module provides an interface to the Elastic Compute Cloud (EC2) Auto Scaling service. """ import base64 import boto from boto.connection import AWSQueryConnection from boto.ec2.regioninfo import RegionInfo from boto.ec2.autoscale.request import Request from boto.ec2.autoscale.launchconfig import LaunchConfiguration from boto.ec2.autoscale.group import AutoScalingGroup, ProcessType from boto.ec2.autoscale.activity import Activity from boto.ec2.autoscale.policy import AdjustmentType, MetricCollectionTypes, ScalingPolicy from boto.ec2.autoscale.instance import Instance from boto.ec2.autoscale.scheduled import ScheduledUpdateGroupAction RegionData = { 'us-east-1' : 'autoscaling.us-east-1.amazonaws.com', 'us-west-1' : 'autoscaling.us-west-1.amazonaws.com', 'eu-west-1' : 'autoscaling.eu-west-1.amazonaws.com', 'ap-northeast-1' : 'autoscaling.ap-northeast-1.amazonaws.com', 'ap-southeast-1' : 'autoscaling.ap-southeast-1.amazonaws.com'} def regions(): """ Get all available regions for the Auto Scaling service. :rtype: list :return: A list of :class:`boto.RegionInfo` instances """ regions = [] for region_name in RegionData: region = RegionInfo(name=region_name, endpoint=RegionData[region_name], connection_cls=AutoScaleConnection) regions.append(region) return regions def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.ec2.autoscale.AutoScaleConnection`. :param str region_name: The name of the region to connect to. :rtype: :class:`boto.ec2.AutoScaleConnection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ for region in regions(): if region.name == region_name: return region.connect(**kw_params) return None class AutoScaleConnection(AWSQueryConnection): APIVersion = boto.config.get('Boto', 'autoscale_version', '2011-01-01') DefaultRegionEndpoint = boto.config.get('Boto', 'autoscale_endpoint', 'autoscaling.amazonaws.com') DefaultRegionName = boto.config.get('Boto', 'autoscale_region_name', 'us-east-1') def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=None, https_connection_factory=None, region=None, path='/'): """ Init method to create a new connection to the AutoScaling service. B{Note:} The host argument is overridden by the host specified in the boto configuration file. """ if not region: region = RegionInfo(self, self.DefaultRegionName, self.DefaultRegionEndpoint, AutoScaleConnection) self.region = region AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, self.region.endpoint, debug, https_connection_factory, path=path) def _required_auth_capability(self): return ['ec2'] def build_list_params(self, params, items, label): """ Items is a list of dictionaries or strings:: [ { 'Protocol' : 'HTTP', 'LoadBalancerPort' : '80', 'InstancePort' : '80' }, .. ] etc. or:: ['us-east-1b',...] """ # different from EC2 list params for i in xrange(1, len(items)+1): if isinstance(items[i-1], dict): for k, v in items[i-1].iteritems(): if isinstance(v, dict): for kk, vv in v.iteritems(): params['%s.member.%d.%s.%s' % (label, i, k, kk)] = vv else: params['%s.member.%d.%s' % (label, i, k)] = v elif isinstance(items[i-1], basestring): params['%s.member.%d' % (label, i)] = items[i-1] def _update_group(self, op, as_group): params = { 'AutoScalingGroupName' : as_group.name, 'LaunchConfigurationName' : as_group.launch_config_name, 'MinSize' : as_group.min_size, 'MaxSize' : as_group.max_size, } # get availability zone information (required param) zones = as_group.availability_zones self.build_list_params(params, zones, 'AvailabilityZones') if as_group.desired_capacity: params['DesiredCapacity'] = as_group.desired_capacity if as_group.vpc_zone_identifier: params['VPCZoneIdentifier'] = as_group.vpc_zone_identifier if as_group.health_check_period: params['HealthCheckGracePeriod'] = as_group.health_check_period if as_group.health_check_type: params['HealthCheckType'] = as_group.health_check_type if as_group.default_cooldown: params['DefaultCooldown'] = as_group.default_cooldown if as_group.placement_group: params['PlacementGroup'] = as_group.placement_group if op.startswith('Create'): # you can only associate load balancers with an autoscale group at creation time if as_group.load_balancers: self.build_list_params(params, as_group.load_balancers, 'LoadBalancerNames') return self.get_object(op, params, Request) def create_auto_scaling_group(self, as_group): """ Create auto scaling group. """ return self._update_group('CreateAutoScalingGroup', as_group) def delete_auto_scaling_group(self, name, force_delete=False): """ Deletes the specified auto scaling group if the group has no instances and no scaling activities in progress. """ if(force_delete): params = {'AutoScalingGroupName' : name, 'ForceDelete' : 'true'} else: params = {'AutoScalingGroupName' : name} return self.get_object('DeleteAutoScalingGroup', params, Request) def create_launch_configuration(self, launch_config): """ Creates a new Launch Configuration. :type launch_config: :class:`boto.ec2.autoscale.launchconfig.LaunchConfiguration` :param launch_config: LaunchConfiguration object. """ params = { 'ImageId' : launch_config.image_id, 'LaunchConfigurationName' : launch_config.name, 'InstanceType' : launch_config.instance_type, } if launch_config.key_name: params['KeyName'] = launch_config.key_name if launch_config.user_data: params['UserData'] = base64.b64encode(launch_config.user_data) if launch_config.kernel_id: params['KernelId'] = launch_config.kernel_id if launch_config.ramdisk_id: params['RamdiskId'] = launch_config.ramdisk_id if launch_config.block_device_mappings: self.build_list_params(params, launch_config.block_device_mappings, 'BlockDeviceMappings') if launch_config.security_groups: self.build_list_params(params, launch_config.security_groups, 'SecurityGroups') if launch_config.instance_monitoring: params['InstanceMonitoring.member.Enabled'] = 'true' return self.get_object('CreateLaunchConfiguration', params, Request, verb='POST') def create_scaling_policy(self, scaling_policy): """ Creates a new Scaling Policy. :type scaling_policy: :class:`boto.ec2.autoscale.policy.ScalingPolicy` :param scaling_policy: ScalingPolicy object. """ params = {'AdjustmentType' : scaling_policy.adjustment_type, 'AutoScalingGroupName': scaling_policy.as_name, 'PolicyName' : scaling_policy.name, 'ScalingAdjustment' : scaling_policy.scaling_adjustment,} if scaling_policy.cooldown is not None: params['Cooldown'] = scaling_policy.cooldown return self.get_object('PutScalingPolicy', params, Request) def delete_launch_configuration(self, launch_config_name): """ Deletes the specified LaunchConfiguration. The specified launch configuration must not be attached to an Auto Scaling group. Once this call completes, the launch configuration is no longer available for use. """ params = {'LaunchConfigurationName' : launch_config_name} return self.get_object('DeleteLaunchConfiguration', params, Request) def get_all_groups(self, names=None, max_records=None, next_token=None): """ Returns a full description of each Auto Scaling group in the given list. This includes all Amazon EC2 instances that are members of the group. If a list of names is not provided, the service returns the full details of all Auto Scaling groups. This action supports pagination by returning a token if there are more pages to retrieve. To get the next page, call this action again with the returned token as the NextToken parameter. :type names: list :param names: List of group names which should be searched for. :type max_records: int :param max_records: Maximum amount of groups to return. :rtype: list :returns: List of :class:`boto.ec2.autoscale.group.AutoScalingGroup` instances. """ params = {} if max_records: params['MaxRecords'] = max_records if next_token: params['NextToken'] = next_token if names: self.build_list_params(params, names, 'AutoScalingGroupNames') return self.get_list('DescribeAutoScalingGroups', params, [('member', AutoScalingGroup)]) def get_all_launch_configurations(self, **kwargs): """ Returns a full description of the launch configurations given the specified names. If no names are specified, then the full details of all launch configurations are returned. :type names: list :param names: List of configuration names which should be searched for. :type max_records: int :param max_records: Maximum amount of configurations to return. :type next_token: str :param next_token: If you have more results than can be returned at once, pass in this parameter to page through all results. :rtype: list :returns: List of :class:`boto.ec2.autoscale.launchconfig.LaunchConfiguration` instances. """ params = {} max_records = kwargs.get('max_records', None) names = kwargs.get('names', None) if max_records is not None: params['MaxRecords'] = max_records if names: self.build_list_params(params, names, 'LaunchConfigurationNames') next_token = kwargs.get('next_token') if next_token: params['NextToken'] = next_token return self.get_list('DescribeLaunchConfigurations', params, [('member', LaunchConfiguration)]) def get_all_activities(self, autoscale_group, activity_ids=None, max_records=None, next_token=None): """ Get all activities for the given autoscaling group. This action supports pagination by returning a token if there are more pages to retrieve. To get the next page, call this action again with the returned token as the NextToken parameter :type autoscale_group: str or :class:`boto.ec2.autoscale.group.AutoScalingGroup` object :param autoscale_group: The auto scaling group to get activities on. :type max_records: int :param max_records: Maximum amount of activities to return. :rtype: list :returns: List of :class:`boto.ec2.autoscale.activity.Activity` instances. """ name = autoscale_group if isinstance(autoscale_group, AutoScalingGroup): name = autoscale_group.name params = {'AutoScalingGroupName' : name} if max_records: params['MaxRecords'] = max_records if next_token: params['NextToken'] = next_token if activity_ids: self.build_list_params(params, activity_ids, 'ActivityIds') return self.get_list('DescribeScalingActivities', params, [('member', Activity)]) def delete_scheduled_action(self, scheduled_action_name, autoscale_group=None): """ Deletes a previously scheduled action. :param str scheduled_action_name: The name of the action you want to delete. :param str autoscale_group: The name of the autoscale group. """ params = {'ScheduledActionName' : scheduled_action_name} if autoscale_group: params['AutoScalingGroupName'] = autoscale_group return self.get_status('DeleteScheduledAction', params) def terminate_instance(self, instance_id, decrement_capacity=True): """ Terminates the specified instance. The desired group size can also be adjusted, if desired. :param str instance_id: The ID of the instance to be terminated. :param bool decrement_capacity: Whether to decrement the size of the autoscaling group or not. """ params = {'InstanceId' : instance_id} if decrement_capacity: params['ShouldDecrementDesiredCapacity'] = 'true' else: params['ShouldDecrementDesiredCapacity'] = 'false' return self.get_object('TerminateInstanceInAutoScalingGroup', params, Activity) def delete_policy(self, policy_name, autoscale_group=None): """ Delete a policy. :type policy_name: str :param policy_name: The name or ARN of the policy to delete. :type autoscale_group: str :param autoscale_group: The name of the autoscale group. """ params = {'PolicyName': policy_name} if autoscale_group: params['AutoScalingGroupName'] = autoscale_group return self.get_status('DeletePolicy', params) def get_all_adjustment_types(self): return self.get_list('DescribeAdjustmentTypes', {}, [('member', AdjustmentType)]) def get_all_autoscaling_instances(self, instance_ids=None, max_records=None, next_token=None): """ Returns a description of each Auto Scaling instance in the instance_ids list. If a list is not provided, the service returns the full details of all instances up to a maximum of fifty. This action supports pagination by returning a token if there are more pages to retrieve. To get the next page, call this action again with the returned token as the NextToken parameter. :type instance_ids: list :param instance_ids: List of Autoscaling Instance IDs which should be searched for. :type max_records: int :param max_records: Maximum number of results to return. :rtype: list :returns: List of :class:`boto.ec2.autoscale.activity.Activity` instances. """ params = {} if instance_ids: self.build_list_params(params, instance_ids, 'InstanceIds') if max_records: params['MaxRecords'] = max_records if next_token: params['NextToken'] = next_token return self.get_list('DescribeAutoScalingInstances', params, [('member', Instance)]) def get_all_metric_collection_types(self): """ Returns a list of metrics and a corresponding list of granularities for each metric. """ return self.get_object('DescribeMetricCollectionTypes', {}, MetricCollectionTypes) def get_all_policies(self, as_group=None, policy_names=None, max_records=None, next_token=None): """ Returns descriptions of what each policy does. This action supports pagination. If the response includes a token, there are more records available. To get the additional records, repeat the request with the response token as the NextToken parameter. If no group name or list of policy names are provided, all available policies are returned. :type as_name: str :param as_name: the name of the :class:`boto.ec2.autoscale.group.AutoScalingGroup` to filter for. :type names: list :param names: List of policy names which should be searched for. :type max_records: int :param max_records: Maximum amount of groups to return. """ params = {} if as_group: params['AutoScalingGroupName'] = as_group if policy_names: self.build_list_params(params, policy_names, 'PolicyNames') if max_records: params['MaxRecords'] = max_records if next_token: params['NextToken'] = next_token return self.get_list('DescribePolicies', params, [('member', ScalingPolicy)]) def get_all_scaling_process_types(self): """ Returns scaling process types for use in the ResumeProcesses and SuspendProcesses actions. """ return self.get_list('DescribeScalingProcessTypes', {}, [('member', ProcessType)]) def suspend_processes(self, as_group, scaling_processes=None): """ Suspends Auto Scaling processes for an Auto Scaling group. :type as_group: string :param as_group: The auto scaling group to suspend processes on. :type scaling_processes: list :param scaling_processes: Processes you want to suspend. If omitted, all processes will be suspended. """ params = {'AutoScalingGroupName' : as_group} if scaling_processes: self.build_list_params(params, scaling_processes, 'ScalingProcesses') return self.get_status('SuspendProcesses', params) def resume_processes(self, as_group, scaling_processes=None): """ Resumes Auto Scaling processes for an Auto Scaling group. :type as_group: string :param as_group: The auto scaling group to resume processes on. :type scaling_processes: list :param scaling_processes: Processes you want to resume. If omitted, all processes will be resumed. """ params = { 'AutoScalingGroupName' : as_group } if scaling_processes: self.build_list_params(params, scaling_processes, 'ScalingProcesses') return self.get_status('ResumeProcesses', params) def create_scheduled_group_action(self, as_group, name, time, desired_capacity=None, min_size=None, max_size=None): """ Creates a scheduled scaling action for a Auto Scaling group. If you leave a parameter unspecified, the corresponding value remains unchanged in the affected Auto Scaling group. :type as_group: string :param as_group: The auto scaling group to get activities on. :type name: string :param name: Scheduled action name. :type time: datetime.datetime :param time: The time for this action to start. :type desired_capacity: int :param desired_capacity: The number of EC2 instances that should be running in this group. :type min_size: int :param min_size: The minimum size for the new auto scaling group. :type max_size: int :param max_size: The minimum size for the new auto scaling group. """ params = { 'AutoScalingGroupName' : as_group, 'ScheduledActionName' : name, 'Time' : time.isoformat(), } if desired_capacity is not None: params['DesiredCapacity'] = desired_capacity if min_size is not None: params['MinSize'] = min_size if max_size is not None: params['MaxSize'] = max_size return self.get_status('PutScheduledUpdateGroupAction', params) def get_all_scheduled_actions(self, as_group=None, start_time=None, end_time=None, scheduled_actions=None, max_records=None, next_token=None): params = {} if as_group: params['AutoScalingGroupName'] = as_group if scheduled_actions: self.build_list_params(params, scheduled_actions, 'ScheduledActionNames') if max_records: params['MaxRecords'] = max_records if next_token: params['NextToken'] = next_token return self.get_list('DescribeScheduledActions', params, [('member', ScheduledUpdateGroupAction)]) def disable_metrics_collection(self, as_group, metrics=None): """ Disables monitoring of group metrics for the Auto Scaling group specified in AutoScalingGroupName. You can specify the list of affected metrics with the Metrics parameter. """ params = { 'AutoScalingGroupName' : as_group, } if metrics: self.build_list_params(params, metrics, 'Metrics') return self.get_status('DisableMetricsCollection', params) def enable_metrics_collection(self, as_group, granularity, metrics=None): """ Enables monitoring of group metrics for the Auto Scaling group specified in AutoScalingGroupName. You can specify the list of enabled metrics with the Metrics parameter. Auto scaling metrics collection can be turned on only if the InstanceMonitoring.Enabled flag, in the Auto Scaling group's launch configuration, is set to true. :type autoscale_group: string :param autoscale_group: The auto scaling group to get activities on. :type granularity: string :param granularity: The granularity to associate with the metrics to collect. Currently, the only legal granularity is "1Minute". :type metrics: string list :param metrics: The list of metrics to collect. If no metrics are specified, all metrics are enabled. """ params = { 'AutoScalingGroupName' : as_group, 'Granularity' : granularity, } if metrics: self.build_list_params(params, metrics, 'Metrics') return self.get_status('EnableMetricsCollection', params) def execute_policy(self, policy_name, as_group=None, honor_cooldown=None): params = { 'PolicyName' : policy_name, } if as_group: params['AutoScalingGroupName'] = as_group if honor_cooldown: params['HonorCooldown'] = honor_cooldown return self.get_status('ExecutePolicy', params) def set_instance_health(self, instance_id, health_status, should_respect_grace_period=True): """ Explicitly set the health status of an instance. :type instance_id: str :param instance_id: The identifier of the EC2 instance. :type health_status: str :param health_status: The health status of the instance. "Healthy" means that the instance is healthy and should remain in service. "Unhealthy" means that the instance is unhealthy. Auto Scaling should terminate and replace it. :type should_respect_grace_period: bool :param should_respect_grace_period: If True, this call should respect the grace period associated with the group. """ params = {'InstanceId' : instance_id, 'HealthStatus' : health_status} if should_respect_grace_period: params['ShouldRespectGracePeriod'] = 'true' else: params['ShouldRespectGracePeriod'] = 'false' return self.get_status('SetInstanceHealth', params) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/autoscale/activity.py ================================================ # Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from datetime import datetime class Activity(object): def __init__(self, connection=None): self.connection = connection self.start_time = None self.end_time = None self.activity_id = None self.progress = None self.status_code = None self.cause = None self.description = None self.status_message = None self.group_name = None def __repr__(self): return 'Activity<%s>: For group:%s, progress:%s, cause:%s' % (self.activity_id, self.group_name, self.status_message, self.cause) def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'ActivityId': self.activity_id = value elif name == 'AutoScalingGroupName': self.group_name = value elif name == 'StartTime': try: self.start_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ') except ValueError: self.start_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ') elif name == 'EndTime': try: self.end_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ') except ValueError: self.end_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ') elif name == 'Progress': self.progress = value elif name == 'Cause': self.cause = value elif name == 'Description': self.description = value elif name == 'StatusMessage': self.status_message = value elif name == 'StatusCode': self.status_code = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/autoscale/group.py ================================================ # Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.ec2.elb.listelement import ListElement from boto.resultset import ResultSet from boto.ec2.autoscale.launchconfig import LaunchConfiguration from boto.ec2.autoscale.request import Request from boto.ec2.autoscale.instance import Instance class ProcessType(object): def __init__(self, connection=None): self.connection = connection self.process_name = None def __repr__(self): return 'ProcessType(%s)' % self.process_name def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'ProcessName': self.process_name = value class SuspendedProcess(object): def __init__(self, connection=None): self.connection = connection self.process_name = None self.reason = None def __repr__(self): return 'SuspendedProcess(%s, %s)' % (self.process_name, self.reason) def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'ProcessName': self.process_name = value elif name == 'SuspensionReason': self.reason = value class EnabledMetric(object): def __init__(self, connection=None, metric=None, granularity=None): self.connection = connection self.metric = metric self.granularity = granularity def __repr__(self): return 'EnabledMetric(%s, %s)' % (self.metric, self.granularity) def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'Granularity': self.granularity = value elif name == 'Metric': self.metric = value class AutoScalingGroup(object): def __init__(self, connection=None, name=None, launch_config=None, availability_zones=None, load_balancers=None, default_cooldown=None, health_check_type=None, health_check_period=None, placement_group=None, vpc_zone_identifier=None, desired_capacity=None, min_size=None, max_size=None, **kwargs): """ Creates a new AutoScalingGroup with the specified name. You must not have already used up your entire quota of AutoScalingGroups in order for this call to be successful. Once the creation request is completed, the AutoScalingGroup is ready to be used in other calls. :type name: str :param name: Name of autoscaling group (required). :type availability_zones: list :param availability_zones: List of availability zones (required). :type default_cooldown: int :param default_cooldown: Number of seconds after a Scaling Activity completes before any further scaling activities can start. :type desired_capacity: int :param desired_capacity: The desired capacity for the group. :type health_check_period: str :param health_check_period: Length of time in seconds after a new EC2 instance comes into service that Auto Scaling starts checking its health. :type health_check_type: str :param health_check_type: The service you want the health status from, Amazon EC2 or Elastic Load Balancer. :type launch_config: str or LaunchConfiguration :param launch_config: Name of launch configuration (required). :type load_balancers: list :param load_balancers: List of load balancers. :type max_size: int :param maxsize: Maximum size of group (required). :type min_size: int :param minsize: Minimum size of group (required). :type placement_group: str :param placement_group: Physical location of your cluster placement group created in Amazon EC2. :type vpc_zone_identifier: str :param vpc_zone_identifier: The subnet identifier of the Virtual Private Cloud. :rtype: :class:`boto.ec2.autoscale.group.AutoScalingGroup` :return: An autoscale group. """ self.name = name or kwargs.get('group_name') # backwards compatibility self.connection = connection self.min_size = int(min_size) if min_size is not None else None self.max_size = int(max_size) if max_size is not None else None self.created_time = None default_cooldown = default_cooldown or kwargs.get('cooldown') # backwards compatibility self.default_cooldown = int(default_cooldown) if default_cooldown is not None else None self.launch_config_name = launch_config if launch_config and isinstance(launch_config, LaunchConfiguration): self.launch_config_name = launch_config.name self.desired_capacity = desired_capacity lbs = load_balancers or [] self.load_balancers = ListElement(lbs) zones = availability_zones or [] self.availability_zones = ListElement(zones) self.health_check_period = health_check_period self.health_check_type = health_check_type self.placement_group = placement_group self.autoscaling_group_arn = None self.vpc_zone_identifier = vpc_zone_identifier self.instances = None # backwards compatible access to 'cooldown' param def _get_cooldown(self): return self.default_cooldown def _set_cooldown(self, val): self.default_cooldown = val cooldown = property(_get_cooldown, _set_cooldown) def __repr__(self): return 'AutoScalingGroup<%s>: created:%s, minsize:%s, maxsize:%s, capacity:%s' % (self.name, self.created_time, self.min_size, self.max_size, self.desired_capacity) def startElement(self, name, attrs, connection): if name == 'Instances': self.instances = ResultSet([('member', Instance)]) return self.instances elif name == 'LoadBalancerNames': return self.load_balancers elif name == 'AvailabilityZones': return self.availability_zones elif name == 'EnabledMetrics': self.enabled_metrics = ResultSet([('member', EnabledMetric)]) return self.enabled_metrics elif name == 'SuspendedProcesses': self.suspended_processes = ResultSet([('member', SuspendedProcess)]) return self.suspended_processes else: return def endElement(self, name, value, connection): if name == 'MinSize': self.min_size = int(value) elif name == 'AutoScalingGroupARN': self.autoscaling_group_arn = value elif name == 'CreatedTime': self.created_time = value elif name == 'DefaultCooldown': self.default_cooldown = int(value) elif name == 'LaunchConfigurationName': self.launch_config_name = value elif name == 'DesiredCapacity': self.desired_capacity = int(value) elif name == 'MaxSize': self.max_size = int(value) elif name == 'AutoScalingGroupName': self.name = value elif name == 'PlacementGroup': self.placement_group = value elif name == 'HealthCheckGracePeriod': self.health_check_period = int(value) elif name == 'HealthCheckType': self.health_check_type = value elif name == 'VPCZoneIdentifier': self.vpc_zone_identifier = value else: setattr(self, name, value) def set_capacity(self, capacity): """ Set the desired capacity for the group. """ params = { 'AutoScalingGroupName' : self.name, 'DesiredCapacity' : capacity, } req = self.connection.get_object('SetDesiredCapacity', params, Request) self.connection.last_request = req return req def update(self): """ Sync local changes with AutoScaling group. """ return self.connection._update_group('UpdateAutoScalingGroup', self) def shutdown_instances(self): """ Convenience method which shuts down all instances associated with this group. """ self.min_size = 0 self.max_size = 0 self.desired_capacity = 0 self.update() def delete(self, force_delete=False): """ Delete this auto-scaling group if no instances attached or no scaling activities in progress. """ return self.connection.delete_auto_scaling_group(self.name, force_delete) def get_activities(self, activity_ids=None, max_records=50): """ Get all activies for this group. """ return self.connection.get_all_activities(self, activity_ids, max_records) def suspend_processes(self, scaling_processes=None): """ Suspends Auto Scaling processes for an Auto Scaling group. """ return self.connection.suspend_processes(self.name, scaling_processes) def resume_processes(self, scaling_processes=None): """ Resumes Auto Scaling processes for an Auto Scaling group. """ return self.connection.resume_processes(self.name, scaling_processes) class AutoScalingGroupMetric(object): def __init__(self, connection=None): self.connection = connection self.metric = None self.granularity = None def __repr__(self): return 'AutoScalingGroupMetric:%s' % self.metric def startElement(self, name, attrs, connection): return def endElement(self, name, value, connection): if name == 'Metric': self.metric = value elif name == 'Granularity': self.granularity = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/autoscale/instance.py ================================================ # Copyright (c) 2009 Reza Lotun http://reza.lotun.name/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class Instance(object): def __init__(self, connection=None): self.connection = connection self.instance_id = None self.health_status = None self.launch_config_name = None self.lifecycle_state = None self.availability_zone = None self.group_name = None def __repr__(self): r = 'Instance' % (self.metrics, self.granularities) def startElement(self, name, attrs, connection): if name == 'Granularities': self.granularities = ResultSet([('member', self.Granularity)]) return self.granularities elif name == 'Metrics': self.metrics = ResultSet([('member', self.Metric)]) return self.metrics def endElement(self, name, value, connection): return class ScalingPolicy(object): def __init__(self, connection=None, **kwargs): """ Scaling Policy :type name: str :param name: Name of scaling policy. :type adjustment_type: str :param adjustment_type: Specifies the type of adjustment. Valid values are `ChangeInCapacity`, `ExactCapacity` and `PercentChangeInCapacity`. :type as_name: str or int :param as_name: Name or ARN of the Auto Scaling Group. :type scaling_adjustment: int :param scaling_adjustment: Value of adjustment (type specified in `adjustment_type`). :type cooldown: int :param cooldown: Time (in seconds) before Alarm related Scaling Activities can start after the previous Scaling Activity ends. """ self.name = kwargs.get('name', None) self.adjustment_type = kwargs.get('adjustment_type', None) self.as_name = kwargs.get('as_name', None) self.scaling_adjustment = kwargs.get('scaling_adjustment', None) self.cooldown = kwargs.get('cooldown', None) self.connection = connection def __repr__(self): return 'ScalingPolicy(%s group:%s adjustment:%s)' % (self.name, self.as_name, self.adjustment_type) def startElement(self, name, attrs, connection): if name == 'Alarms': self.alarms = ResultSet([('member', Alarm)]) return self.alarms def endElement(self, name, value, connection): if name == 'PolicyName': self.name = value elif name == 'AutoScalingGroupName': self.as_name = value elif name == 'PolicyARN': self.policy_arn = value elif name == 'ScalingAdjustment': self.scaling_adjustment = int(value) elif name == 'Cooldown': self.cooldown = int(value) elif name == 'AdjustmentType': self.adjustment_type = value def delete(self): return self.connection.delete_policy(self.name, self.as_name) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/autoscale/request.py ================================================ # Copyright (c) 2009 Reza Lotun http://reza.lotun.name/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class Request(object): def __init__(self, connection=None): self.connection = connection self.request_id = '' def __repr__(self): return 'Request:%s' % self.request_id def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'RequestId': self.request_id = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/autoscale/scheduled.py ================================================ # Copyright (c) 2009-2010 Reza Lotun http://reza.lotun.name/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from datetime import datetime class ScheduledUpdateGroupAction(object): def __init__(self, connection=None): self.connection = connection self.name = None self.action_arn = None self.time = None self.desired_capacity = None self.max_size = None self.min_size = None def __repr__(self): return 'ScheduledUpdateGroupAction:%s' % self.name def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'DesiredCapacity': self.desired_capacity = value elif name == 'ScheduledActionName': self.name = value elif name == 'MaxSize': self.max_size = int(value) elif name == 'MinSize': self.min_size = int(value) elif name == 'ScheduledActionARN': self.action_arn = value elif name == 'Time': try: self.time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ') except ValueError: self.time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ') else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/blockdevicemapping.py ================================================ # Copyright (c) 2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # class BlockDeviceType(object): def __init__(self, connection=None, ephemeral_name=None, no_device=False, volume_id=None, snapshot_id=None, status=None, attach_time=None, delete_on_termination=False, size=None): self.connection = connection self.ephemeral_name = ephemeral_name self.no_device = no_device self.volume_id = volume_id self.snapshot_id = snapshot_id self.status = status self.attach_time = attach_time self.delete_on_termination = delete_on_termination self.size = size def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name =='volumeId': self.volume_id = value elif name == 'virtualName': self.ephemeral_name = value elif name =='NoDevice': self.no_device = (value == 'true') elif name =='snapshotId': self.snapshot_id = value elif name == 'volumeSize': self.size = int(value) elif name == 'status': self.status = value elif name == 'attachTime': self.attach_time = value elif name == 'deleteOnTermination': if value == 'true': self.delete_on_termination = True else: self.delete_on_termination = False else: setattr(self, name, value) # for backwards compatibility EBSBlockDeviceType = BlockDeviceType class BlockDeviceMapping(dict): def __init__(self, connection=None): dict.__init__(self) self.connection = connection self.current_name = None self.current_value = None def startElement(self, name, attrs, connection): if name == 'ebs' or name == 'virtualName': self.current_value = BlockDeviceType(self) return self.current_value def endElement(self, name, value, connection): if name == 'device' or name == 'deviceName': self.current_name = value elif name == 'item': self[self.current_name] = self.current_value def build_list_params(self, params, prefix=''): i = 1 for dev_name in self: pre = '%sBlockDeviceMapping.%d' % (prefix, i) params['%s.DeviceName' % pre] = dev_name block_dev = self[dev_name] if block_dev.ephemeral_name: params['%s.VirtualName' % pre] = block_dev.ephemeral_name else: if block_dev.no_device: params['%s.Ebs.NoDevice' % pre] = 'true' if block_dev.snapshot_id: params['%s.Ebs.SnapshotId' % pre] = block_dev.snapshot_id if block_dev.size: params['%s.Ebs.VolumeSize' % pre] = block_dev.size if block_dev.delete_on_termination: params['%s.Ebs.DeleteOnTermination' % pre] = 'true' else: params['%s.Ebs.DeleteOnTermination' % pre] = 'false' i += 1 ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/bundleinstance.py ================================================ # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an EC2 Bundle Task """ from boto.ec2.ec2object import EC2Object class BundleInstanceTask(EC2Object): def __init__(self, connection=None): EC2Object.__init__(self, connection) self.id = None self.instance_id = None self.progress = None self.start_time = None self.state = None self.bucket = None self.prefix = None self.upload_policy = None self.upload_policy_signature = None self.update_time = None self.code = None self.message = None def __repr__(self): return 'BundleInstanceTask:%s' % self.id def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'bundleId': self.id = value elif name == 'instanceId': self.instance_id = value elif name == 'progress': self.progress = value elif name == 'startTime': self.start_time = value elif name == 'state': self.state = value elif name == 'bucket': self.bucket = value elif name == 'prefix': self.prefix = value elif name == 'uploadPolicy': self.upload_policy = value elif name == 'uploadPolicySignature': self.upload_policy_signature = value elif name == 'updateTime': self.update_time = value elif name == 'code': self.code = value elif name == 'message': self.message = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/buyreservation.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import boto.ec2 from boto.sdb.db.property import StringProperty, IntegerProperty from boto.manage import propget InstanceTypes = ['m1.small', 'm1.large', 'm1.xlarge', 'c1.medium', 'c1.xlarge', 'm2.xlarge', 'm2.2xlarge', 'm2.4xlarge', 'cc1.4xlarge', 't1.micro'] class BuyReservation(object): def get_region(self, params): if not params.get('region', None): prop = StringProperty(name='region', verbose_name='EC2 Region', choices=boto.ec2.regions) params['region'] = propget.get(prop, choices=boto.ec2.regions) def get_instance_type(self, params): if not params.get('instance_type', None): prop = StringProperty(name='instance_type', verbose_name='Instance Type', choices=InstanceTypes) params['instance_type'] = propget.get(prop) def get_quantity(self, params): if not params.get('quantity', None): prop = IntegerProperty(name='quantity', verbose_name='Number of Instances') params['quantity'] = propget.get(prop) def get_zone(self, params): if not params.get('zone', None): prop = StringProperty(name='zone', verbose_name='EC2 Availability Zone', choices=self.ec2.get_all_zones) params['zone'] = propget.get(prop) def get(self, params): self.get_region(params) self.ec2 = params['region'].connect() self.get_instance_type(params) self.get_zone(params) self.get_quantity(params) if __name__ == "__main__": obj = BuyReservation() params = {} obj.get(params) offerings = obj.ec2.get_all_reserved_instances_offerings(instance_type=params['instance_type'], availability_zone=params['zone'].name) print '\nThe following Reserved Instances Offerings are available:\n' for offering in offerings: offering.describe() prop = StringProperty(name='offering', verbose_name='Offering', choices=offerings) offering = propget.get(prop) print '\nYou have chosen this offering:' offering.describe() unit_price = float(offering.fixed_price) total_price = unit_price * params['quantity'] print '!!! You are about to purchase %d of these offerings for a total of $%.2f !!!' % (params['quantity'], total_price) answer = raw_input('Are you sure you want to do this? If so, enter YES: ') if answer.strip().lower() == 'yes': offering.purchase(params['quantity']) else: print 'Purchase cancelled' ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/cloudwatch/__init__.py ================================================ # Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # """ This module provides an interface to the Elastic Compute Cloud (EC2) CloudWatch service from AWS. The 5 Minute How-To Guide ------------------------- First, make sure you have something to monitor. You can either create a LoadBalancer or enable monitoring on an existing EC2 instance. To enable monitoring, you can either call the monitor_instance method on the EC2Connection object or call the monitor method on the Instance object. It takes a while for the monitoring data to start accumulating but once it does, you can do this: >>> import boto >>> c = boto.connect_cloudwatch() >>> metrics = c.list_metrics() >>> metrics [Metric:NetworkIn, Metric:NetworkOut, Metric:NetworkOut(InstanceType,m1.small), Metric:NetworkIn(InstanceId,i-e573e68c), Metric:CPUUtilization(InstanceId,i-e573e68c), Metric:DiskWriteBytes(InstanceType,m1.small), Metric:DiskWriteBytes(ImageId,ami-a1ffb63), Metric:NetworkOut(ImageId,ami-a1ffb63), Metric:DiskWriteOps(InstanceType,m1.small), Metric:DiskReadBytes(InstanceType,m1.small), Metric:DiskReadOps(ImageId,ami-a1ffb63), Metric:CPUUtilization(InstanceType,m1.small), Metric:NetworkIn(ImageId,ami-a1ffb63), Metric:DiskReadOps(InstanceType,m1.small), Metric:DiskReadBytes, Metric:CPUUtilization, Metric:DiskWriteBytes(InstanceId,i-e573e68c), Metric:DiskWriteOps(InstanceId,i-e573e68c), Metric:DiskWriteOps, Metric:DiskReadOps, Metric:CPUUtilization(ImageId,ami-a1ffb63), Metric:DiskReadOps(InstanceId,i-e573e68c), Metric:NetworkOut(InstanceId,i-e573e68c), Metric:DiskReadBytes(ImageId,ami-a1ffb63), Metric:DiskReadBytes(InstanceId,i-e573e68c), Metric:DiskWriteBytes, Metric:NetworkIn(InstanceType,m1.small), Metric:DiskWriteOps(ImageId,ami-a1ffb63)] The list_metrics call will return a list of all of the available metrics that you can query against. Each entry in the list is a Metric object. As you can see from the list above, some of the metrics are generic metrics and some have Dimensions associated with them (e.g. InstanceType=m1.small). The Dimension can be used to refine your query. So, for example, I could query the metric Metric:CPUUtilization which would create the desired statistic by aggregating cpu utilization data across all sources of information available or I could refine that by querying the metric Metric:CPUUtilization(InstanceId,i-e573e68c) which would use only the data associated with the instance identified by the instance ID i-e573e68c. Because for this example, I'm only monitoring a single instance, the set of metrics available to me are fairly limited. If I was monitoring many instances, using many different instance types and AMI's and also several load balancers, the list of available metrics would grow considerably. Once you have the list of available metrics, you can actually query the CloudWatch system for that metric. Let's choose the CPU utilization metric for our instance. >>> m = metrics[5] >>> m Metric:CPUUtilization(InstanceId,i-e573e68c) The Metric object has a query method that lets us actually perform the query against the collected data in CloudWatch. To call that, we need a start time and end time to control the time span of data that we are interested in. For this example, let's say we want the data for the previous hour: >>> import datetime >>> end = datetime.datetime.now() >>> start = end - datetime.timedelta(hours=1) We also need to supply the Statistic that we want reported and the Units to use for the results. The Statistic can be one of these values: ['Minimum', 'Maximum', 'Sum', 'Average', 'SampleCount'] And Units must be one of the following: ['Seconds', 'Percent', 'Bytes', 'Bits', 'Count', 'Bytes/Second', 'Bits/Second', 'Count/Second'] The query method also takes an optional parameter, period. This parameter controls the granularity (in seconds) of the data returned. The smallest period is 60 seconds and the value must be a multiple of 60 seconds. So, let's ask for the average as a percent: >>> datapoints = m.query(start, end, 'Average', 'Percent') >>> len(datapoints) 60 Our period was 60 seconds and our duration was one hour so we should get 60 data points back and we can see that we did. Each element in the datapoints list is a DataPoint object which is a simple subclass of a Python dict object. Each Datapoint object contains all of the information available about that particular data point. >>> d = datapoints[0] >>> d {u'Average': 0.0, u'SampleCount': 1.0, u'Timestamp': u'2009-05-21T19:55:00Z', u'Unit': u'Percent'} My server obviously isn't very busy right now! """ try: import simplejson as json except ImportError: import json from boto.connection import AWSQueryConnection from boto.ec2.cloudwatch.metric import Metric from boto.ec2.cloudwatch.alarm import MetricAlarm, AlarmHistoryItem from boto.ec2.cloudwatch.datapoint import Datapoint from boto.regioninfo import RegionInfo import boto RegionData = { 'us-east-1' : 'monitoring.us-east-1.amazonaws.com', 'us-west-1' : 'monitoring.us-west-1.amazonaws.com', 'eu-west-1' : 'monitoring.eu-west-1.amazonaws.com', 'ap-northeast-1' : 'monitoring.ap-northeast-1.amazonaws.com', 'ap-southeast-1' : 'monitoring.ap-southeast-1.amazonaws.com'} def regions(): """ Get all available regions for the CloudWatch service. :rtype: list :return: A list of :class:`boto.RegionInfo` instances """ regions = [] for region_name in RegionData: region = RegionInfo(name=region_name, endpoint=RegionData[region_name], connection_cls=CloudWatchConnection) regions.append(region) return regions def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.ec2.cloudwatch.CloudWatchConnection`. :param str region_name: The name of the region to connect to. :rtype: :class:`boto.ec2.CloudWatchConnection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ for region in regions(): if region.name == region_name: return region.connect(**kw_params) return None class CloudWatchConnection(AWSQueryConnection): APIVersion = boto.config.get('Boto', 'cloudwatch_version', '2010-08-01') DefaultRegionName = boto.config.get('Boto', 'cloudwatch_region_name', 'us-east-1') DefaultRegionEndpoint = boto.config.get('Boto', 'cloudwatch_region_endpoint', 'monitoring.amazonaws.com') def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, region=None, path='/'): """ Init method to create a new connection to EC2 Monitoring Service. B{Note:} The host argument is overridden by the host specified in the boto configuration file. """ if not region: region = RegionInfo(self, self.DefaultRegionName, self.DefaultRegionEndpoint) self.region = region AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, self.region.endpoint, debug, https_connection_factory, path) def _required_auth_capability(self): return ['ec2'] def build_dimension_param(self, dimension, params): for dim_name in dimension: dim_value = dimension[dim_name] if isinstance(dim_value, basestring): dim_value = [dim_value] for i, value in enumerate(dim_value): params['Dimensions.member.%d.Name' % (i+1)] = dim_name params['Dimensions.member.%d.Value' % (i+1)] = value def build_list_params(self, params, items, label): if isinstance(items, basestring): items = [items] for index, item in enumerate(items): i = index + 1 if isinstance(item, dict): for k,v in item.iteritems(): params[label % (i, 'Name')] = k if v is not None: params[label % (i, 'Value')] = v else: params[label % i] = item def build_put_params(self, params, name, value=None, timestamp=None, unit=None, dimensions=None, statistics=None): args = (name, value, unit, dimensions, statistics) length = max(map(lambda a: len(a) if isinstance(a, list) else 1, args)) def aslist(a): if isinstance(a, list): if len(a) != length: raise Exception('Must specify equal number of elements; expected %d.' % length) return a return [a] * length for index, (n, v, u, d, s) in enumerate(zip(*map(aslist, args))): metric_data = {'MetricName': n} if timestamp: metric_data['Timestamp'] = timestamp.isoformat() if unit: metric_data['Unit'] = u if dimensions: self.build_dimension_param(d, metric_data) if statistics: metric_data['StatisticValues.Maximum'] = s['maximum'] metric_data['StatisticValues.Minimum'] = s['minimum'] metric_data['StatisticValues.SampleCount'] = s['samplecount'] metric_data['StatisticValues.Sum'] = s['sum'] if value != None: msg = 'You supplied a value and statistics for a metric.' msg += 'Posting statistics and not value.' boto.log.warn(msg) elif value != None: metric_data['Value'] = v else: raise Exception('Must specify a value or statistics to put.') for key, value in metric_data.iteritems(): params['MetricData.member.%d.%s' % (index + 1, key)] = value def get_metric_statistics(self, period, start_time, end_time, metric_name, namespace, statistics, dimensions=None, unit=None): """ Get time-series data for one or more statistics of a given metric. :type period: integer :param period: The granularity, in seconds, of the returned datapoints. Period must be at least 60 seconds and must be a multiple of 60. The default value is 60. :type start_time: datetime :param start_time: The time stamp to use for determining the first datapoint to return. The value specified is inclusive; results include datapoints with the time stamp specified. :type end_time: datetime :param end_time: The time stamp to use for determining the last datapoint to return. The value specified is exclusive; results will include datapoints up to the time stamp specified. :type metric_name: string :param metric_name: The metric name. :type namespace: string :param namespace: The metric's namespace. :type statistics: list :param statistics: A list of statistics names Valid values: Average | Sum | SampleCount | Maximum | Minimum :type dimensions: dict :param dimensions: A dictionary of dimension key/values where the key is the dimension name and the value is either a scalar value or an iterator of values to be associated with that dimension. :rtype: list """ params = {'Period' : period, 'MetricName' : metric_name, 'Namespace' : namespace, 'StartTime' : start_time.isoformat(), 'EndTime' : end_time.isoformat()} self.build_list_params(params, statistics, 'Statistics.member.%d') if dimensions: self.build_dimension_param(dimensions, params) return self.get_list('GetMetricStatistics', params, [('member', Datapoint)]) def list_metrics(self, next_token=None, dimensions=None, metric_name=None, namespace=None): """ Returns a list of the valid metrics for which there is recorded data available. :type next_token: str :param next_token: A maximum of 500 metrics will be returned at one time. If more results are available, the ResultSet returned will contain a non-Null next_token attribute. Passing that token as a parameter to list_metrics will retrieve the next page of metrics. :type dimension: dict :param dimension_filters: A dictionary containing name/value pairs that will be used to filter the results. The key in the dictionary is the name of a Dimension. The value in the dictionary is either a scalar value of that Dimension name that you want to filter on, a list of values to filter on or None if you want all metrics with that Dimension name. :type metric_name: str :param metric_name: The name of the Metric to filter against. If None, all Metric names will be returned. :type namespace: str :param namespace: A Metric namespace to filter against (e.g. AWS/EC2). If None, Metrics from all namespaces will be returned. """ params = {} if next_token: params['NextToken'] = next_token if dimensions: self.build_dimension_param(dimensions, params) if metric_name: params['MetricName'] = metric_name if namespace: params['Namespace'] = namespace return self.get_list('ListMetrics', params, [('member', Metric)]) def put_metric_data(self, namespace, name, value=None, timestamp=None, unit=None, dimensions=None, statistics=None): """ Publishes metric data points to Amazon CloudWatch. Amazon Cloudwatch associates the data points with the specified metric. If the specified metric does not exist, Amazon CloudWatch creates the metric. If a list is specified for some, but not all, of the arguments, the remaining arguments are repeated a corresponding number of times. :type namespace: str :param namespace: The namespace of the metric. :type name: str or list :param name: The name of the metric. :type value: float or list :param value: The value for the metric. :type timestamp: datetime or list :param timestamp: The time stamp used for the metric. If not specified, the default value is set to the time the metric data was received. :type unit: string or list :param unit: The unit of the metric. Valid Values: Seconds | Microseconds | Milliseconds | Bytes | Kilobytes | Megabytes | Gigabytes | Terabytes | Bits | Kilobits | Megabits | Gigabits | Terabits | Percent | Count | Bytes/Second | Kilobytes/Second | Megabytes/Second | Gigabytes/Second | Terabytes/Second | Bits/Second | Kilobits/Second | Megabits/Second | Gigabits/Second | Terabits/Second | Count/Second | None :type dimensions: dict :param dimensions: Add extra name value pairs to associate with the metric, i.e.: {'name1': value1, 'name2': (value2, value3)} :type statistics: dict or list :param statistics: Use a statistic set instead of a value, for example:: {'maximum': 30, 'minimum': 1, 'samplecount': 100, 'sum': 10000} """ params = {'Namespace': namespace} self.build_put_params(params, name, value=value, timestamp=timestamp, unit=unit, dimensions=dimensions, statistics=statistics) return self.get_status('PutMetricData', params) def describe_alarms(self, action_prefix=None, alarm_name_prefix=None, alarm_names=None, max_records=None, state_value=None, next_token=None): """ Retrieves alarms with the specified names. If no name is specified, all alarms for the user are returned. Alarms can be retrieved by using only a prefix for the alarm name, the alarm state, or a prefix for any action. :type action_prefix: string :param action_name: The action name prefix. :type alarm_name_prefix: string :param alarm_name_prefix: The alarm name prefix. AlarmNames cannot be specified if this parameter is specified. :type alarm_names: list :param alarm_names: A list of alarm names to retrieve information for. :type max_records: int :param max_records: The maximum number of alarm descriptions to retrieve. :type state_value: string :param state_value: The state value to be used in matching alarms. :type next_token: string :param next_token: The token returned by a previous call to indicate that there is more data. :rtype list """ params = {} if action_prefix: params['ActionPrefix'] = action_prefix if alarm_name_prefix: params['AlarmNamePrefix'] = alarm_name_prefix elif alarm_names: self.build_list_params(params, alarm_names, 'AlarmNames.member.%s') if max_records: params['MaxRecords'] = max_records if next_token: params['NextToken'] = next_token if state_value: params['StateValue'] = state_value return self.get_list('DescribeAlarms', params, [('member', MetricAlarm)]) def describe_alarm_history(self, alarm_name=None, start_date=None, end_date=None, max_records=None, history_item_type=None, next_token=None): """ Retrieves history for the specified alarm. Filter alarms by date range or item type. If an alarm name is not specified, Amazon CloudWatch returns histories for all of the owner's alarms. Amazon CloudWatch retains the history of deleted alarms for a period of six weeks. If an alarm has been deleted, its history can still be queried. :type alarm_name: string :param alarm_name: The name of the alarm. :type start_date: datetime :param start_date: The starting date to retrieve alarm history. :type end_date: datetime :param end_date: The starting date to retrieve alarm history. :type history_item_type: string :param history_item_type: The type of alarm histories to retreive (ConfigurationUpdate | StateUpdate | Action) :type max_records: int :param max_records: The maximum number of alarm descriptions to retrieve. :type next_token: string :param next_token: The token returned by a previous call to indicate that there is more data. :rtype list """ params = {} if alarm_name: params['AlarmName'] = alarm_name if start_date: params['StartDate'] = start_date.isoformat() if end_date: params['EndDate'] = end_date.isoformat() if history_item_type: params['HistoryItemType'] = history_item_type if max_records: params['MaxRecords'] = max_records if next_token: params['NextToken'] = next_token return self.get_list('DescribeAlarmHistory', params, [('member', AlarmHistoryItem)]) def describe_alarms_for_metric(self, metric_name, namespace, period=None, statistic=None, dimensions=None, unit=None): """ Retrieves all alarms for a single metric. Specify a statistic, period, or unit to filter the set of alarms further. :type metric_name: string :param metric_name: The name of the metric :type namespace: string :param namespace: The namespace of the metric. :type period: int :param period: The period in seconds over which the statistic is applied. :type statistic: string :param statistic: The statistic for the metric. :param dimension_filters: A dictionary containing name/value pairs that will be used to filter the results. The key in the dictionary is the name of a Dimension. The value in the dictionary is either a scalar value of that Dimension name that you want to filter on, a list of values to filter on or None if you want all metrics with that Dimension name. :type unit: string :rtype list """ params = {'MetricName' : metric_name, 'Namespace' : namespace} if period: params['Period'] = period if statistic: params['Statistic'] = statistic if dimensions: self.build_dimension_param(dimensions, params) if unit: params['Unit'] = unit return self.get_list('DescribeAlarmsForMetric', params, [('member', MetricAlarm)]) def put_metric_alarm(self, alarm): """ Creates or updates an alarm and associates it with the specified Amazon CloudWatch metric. Optionally, this operation can associate one or more Amazon Simple Notification Service resources with the alarm. When this operation creates an alarm, the alarm state is immediately set to INSUFFICIENT_DATA. The alarm is evaluated and its StateValue is set appropriately. Any actions associated with the StateValue is then executed. When updating an existing alarm, its StateValue is left unchanged. :type alarm: boto.ec2.cloudwatch.alarm.MetricAlarm :param alarm: MetricAlarm object. """ params = { 'AlarmName' : alarm.name, 'MetricName' : alarm.metric, 'Namespace' : alarm.namespace, 'Statistic' : alarm.statistic, 'ComparisonOperator' : alarm.comparison, 'Threshold' : alarm.threshold, 'EvaluationPeriods' : alarm.evaluation_periods, 'Period' : alarm.period, } if alarm.actions_enabled is not None: params['ActionsEnabled'] = alarm.actions_enabled if alarm.alarm_actions: self.build_list_params(params, alarm.alarm_actions, 'AlarmActions.member.%s') if alarm.description: params['AlarmDescription'] = alarm.description if alarm.dimensions: self.build_dimension_param(alarm.dimensions, params) if alarm.insufficient_data_actions: self.build_list_params(params, alarm.insufficient_data_actions, 'InsufficientDataActions.member.%s') if alarm.ok_actions: self.build_list_params(params, alarm.ok_actions, 'OKActions.member.%s') if alarm.unit: params['Unit'] = alarm.unit alarm.connection = self return self.get_status('PutMetricAlarm', params) create_alarm = put_metric_alarm update_alarm = put_metric_alarm def delete_alarms(self, alarms): """ Deletes all specified alarms. In the event of an error, no alarms are deleted. :type alarms: list :param alarms: List of alarm names. """ params = {} self.build_list_params(params, alarms, 'AlarmNames.member.%s') return self.get_status('DeleteAlarms', params) def set_alarm_state(self, alarm_name, state_reason, state_value, state_reason_data=None): """ Temporarily sets the state of an alarm. When the updated StateValue differs from the previous value, the action configured for the appropriate state is invoked. This is not a permanent change. The next periodic alarm check (in about a minute) will set the alarm to its actual state. :type alarm_name: string :param alarm_name: Descriptive name for alarm. :type state_reason: string :param state_reason: Human readable reason. :type state_value: string :param state_value: OK | ALARM | INSUFFICIENT_DATA :type state_reason_data: string :param state_reason_data: Reason string (will be jsonified). """ params = {'AlarmName' : alarm_name, 'StateReason' : state_reason, 'StateValue' : state_value} if state_reason_data: params['StateReasonData'] = json.dumps(state_reason_data) return self.get_status('SetAlarmState', params) def enable_alarm_actions(self, alarm_names): """ Enables actions for the specified alarms. :type alarms: list :param alarms: List of alarm names. """ params = {} self.build_list_params(params, alarm_names, 'AlarmNames.member.%s') return self.get_status('EnableAlarmActions', params) def disable_alarm_actions(self, alarm_names): """ Disables actions for the specified alarms. :type alarms: list :param alarms: List of alarm names. """ params = {} self.build_list_params(params, alarm_names, 'AlarmNames.member.%s') return self.get_status('DisableAlarmActions', params) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/cloudwatch/alarm.py ================================================ # Copyright (c) 2010 Reza Lotun http://reza.lotun.name # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # from datetime import datetime from boto.resultset import ResultSet from boto.ec2.cloudwatch.listelement import ListElement try: import simplejson as json except ImportError: import json class MetricAlarm(object): OK = 'OK' ALARM = 'ALARM' INSUFFICIENT_DATA = 'INSUFFICIENT_DATA' _cmp_map = { '>=' : 'GreaterThanOrEqualToThreshold', '>' : 'GreaterThanThreshold', '<' : 'LessThanThreshold', '<=' : 'LessThanOrEqualToThreshold', } _rev_cmp_map = dict((v, k) for (k, v) in _cmp_map.iteritems()) def __init__(self, connection=None, name=None, metric=None, namespace=None, statistic=None, comparison=None, threshold=None, period=None, evaluation_periods=None, unit=None, description='', dimensions=None, alarm_actions=None, insufficient_data_actions=None, ok_actions=None): """ Creates a new Alarm. :type name: str :param name: Name of alarm. :type metric: str :param metric: Name of alarm's associated metric. :type namespace: str :param namespace: The namespace for the alarm's metric. :type statistic: str :param statistic: The statistic to apply to the alarm's associated metric. Valid values: SampleCount|Average|Sum|Minimum|Maximum :type comparison: str :param comparison: Comparison used to compare statistic with threshold. Valid values: >= | > | < | <= :type threshold: float :param threshold: The value against which the specified statistic is compared. :type period: int :param period: The period in seconds over which teh specified statistic is applied. :type evaluation_periods: int :param evaluation_period: The number of periods over which data is compared to the specified threshold. :type unit: str :param unit: Allowed Values are: Seconds|Microseconds|Milliseconds, Bytes|Kilobytes|Megabytes|Gigabytes|Terabytes, Bits|Kilobits|Megabits|Gigabits|Terabits, Percent|Count| Bytes/Second|Kilobytes/Second|Megabytes/Second| Gigabytes/Second|Terabytes/Second, Bits/Second|Kilobits/Second|Megabits/Second, Gigabits/Second|Terabits/Second|Count/Second|None :type description: str :param description: Description of MetricAlarm :type dimensions: list of dicts :param description: Dimensions of alarm, such as: [{'InstanceId':['i-0123456,i-0123457']}] :type alarm_actions: list of strs :param alarm_actions: A list of the ARNs of the actions to take in ALARM state :type insufficient_data_actions: list of strs :param insufficient_data_actions: A list of the ARNs of the actions to take in INSUFFICIENT_DATA state :type ok_actions: list of strs :param ok_actions: A list of the ARNs of the actions to take in OK state """ self.name = name self.connection = connection self.metric = metric self.namespace = namespace self.statistic = statistic if threshold is not None: self.threshold = float(threshold) else: self.threshold = None self.comparison = self._cmp_map.get(comparison) if period is not None: self.period = int(period) else: self.period = None if evaluation_periods is not None: self.evaluation_periods = int(evaluation_periods) else: self.evaluation_periods = None self.actions_enabled = None self.alarm_arn = None self.last_updated = None self.description = description self.dimensions = dimensions self.state_reason = None self.state_value = None self.unit = unit self.alarm_actions = alarm_actions self.insufficient_data_actions = insufficient_data_actions self.ok_actions = ok_actions def __repr__(self): return 'MetricAlarm:%s[%s(%s) %s %s]' % (self.name, self.metric, self.statistic, self.comparison, self.threshold) def startElement(self, name, attrs, connection): if name == 'AlarmActions': self.alarm_actions = ListElement() return self.alarm_actions elif name == 'InsufficientDataActions': self.insufficient_data_actions = ListElement() return self.insufficient_data_actions elif name == 'OKActions': self.ok_actions = ListElement() return self.ok_actions else: pass def endElement(self, name, value, connection): if name == 'ActionsEnabled': self.actions_enabled = value elif name == 'AlarmArn': self.alarm_arn = value elif name == 'AlarmConfigurationUpdatedTimestamp': self.last_updated = value elif name == 'AlarmDescription': self.description = value elif name == 'AlarmName': self.name = value elif name == 'ComparisonOperator': setattr(self, 'comparison', self._rev_cmp_map[value]) elif name == 'EvaluationPeriods': self.evaluation_periods = int(value) elif name == 'MetricName': self.metric = value elif name == 'Namespace': self.namespace = value elif name == 'Period': self.period = int(value) elif name == 'StateReason': self.state_reason = value elif name == 'StateValue': self.state_value = value elif name == 'Statistic': self.statistic = value elif name == 'Threshold': self.threshold = float(value) elif name == 'Unit': self.unit = value else: setattr(self, name, value) def set_state(self, value, reason, data=None): """ Temporarily sets the state of an alarm. :type value: str :param value: OK | ALARM | INSUFFICIENT_DATA :type reason: str :param reason: Reason alarm set (human readable). :type data: str :param data: Reason data (will be jsonified). """ return self.connection.set_alarm_state(self.name, reason, value, data) def update(self): return self.connection.update_alarm(self) def enable_actions(self): return self.connection.enable_alarm_actions([self.name]) def disable_actions(self): return self.connection.disable_alarm_actions([self.name]) def describe_history(self, start_date=None, end_date=None, max_records=None, history_item_type=None, next_token=None): return self.connection.describe_alarm_history(self.name, start_date, end_date, max_records, history_item_type, next_token) def add_alarm_action(self, action_arn=None): """ Adds an alarm action, represented as an SNS topic, to this alarm. What do do when alarm is triggered. :type action_arn: str :param action_arn: SNS topics to which notification should be sent if the alarm goes to state ALARM. """ if not action_arn: return # Raise exception instead? self.actions_enabled = 'true' self.alarm_actions.append(action_arn) def add_insufficient_data_action(self, action_arn=None): """ Adds an insufficient_data action, represented as an SNS topic, to this alarm. What to do when the insufficient_data state is reached. :type action_arn: str :param action_arn: SNS topics to which notification should be sent if the alarm goes to state INSUFFICIENT_DATA. """ if not action_arn: return self.actions_enabled = 'true' self.insufficient_data_actions.append(action_arn) def add_ok_action(self, action_arn=None): """ Adds an ok action, represented as an SNS topic, to this alarm. What to do when the ok state is reached. :type action_arn: str :param action_arn: SNS topics to which notification should be sent if the alarm goes to state INSUFFICIENT_DATA. """ if not action_arn: return self.actions_enabled = 'true' self.ok_actions.append(action_arn) def delete(self): self.connection.delete_alarms([self]) class AlarmHistoryItem(object): def __init__(self, connection=None): self.connection = connection def __repr__(self): return 'AlarmHistory:%s[%s at %s]' % (self.name, self.summary, self.timestamp) def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'AlarmName': self.name = value elif name == 'HistoryData': self.data = json.loads(value) elif name == 'HistoryItemType': self.tem_type = value elif name == 'HistorySummary': self.summary = value elif name == 'Timestamp': self.timestamp = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ') ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/cloudwatch/datapoint.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # from datetime import datetime class Datapoint(dict): def __init__(self, connection=None): dict.__init__(self) self.connection = connection def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name in ['Average', 'Maximum', 'Minimum', 'Sum', 'SampleCount']: self[name] = float(value) elif name == 'Timestamp': self[name] = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ') elif name != 'member': self[name] = value ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/cloudwatch/listelement.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class ListElement(list): def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'member': self.append(value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/cloudwatch/metric.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # from boto.ec2.cloudwatch.alarm import MetricAlarm class Dimension(dict): def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'Name': self._name = value elif name == 'Value': if self._name in self: self[self._name].append(value) else: self[self._name] = [value] else: setattr(self, name, value) class Metric(object): Statistics = ['Minimum', 'Maximum', 'Sum', 'Average', 'SampleCount'] Units = ['Seconds', 'Microseconds', 'Milliseconds', 'Bytes', 'Kilobytes', 'Megabytes', 'Gigabytes', 'Terabytes', 'Bits', 'Kilobits', 'Megabits', 'Gigabits', 'Terabits', 'Percent', 'Count', 'Bytes/Second', 'Kilobytes/Second', 'Megabytes/Second', 'Gigabytes/Second', 'Terabytes/Second', 'Bits/Second', 'Kilobits/Second', 'Megabits/Second', 'Gigabits/Second', 'Terabits/Second', 'Count/Second', None] def __init__(self, connection=None): self.connection = connection self.name = None self.namespace = None self.dimensions = None def __repr__(self): return 'Metric:%s' % self.name def startElement(self, name, attrs, connection): if name == 'Dimensions': self.dimensions = Dimension() return self.dimensions def endElement(self, name, value, connection): if name == 'MetricName': self.name = value elif name == 'Namespace': self.namespace = value else: setattr(self, name, value) def query(self, start_time, end_time, statistics, unit=None, period=60): if not isinstance(statistics, list): statistics = [statistics] return self.connection.get_metric_statistics(period, start_time, end_time, self.name, self.namespace, statistics, self.dimensions, unit) def create_alarm(self, name, comparison, threshold, period, evaluation_periods, statistic, enabled=True, description=None, dimensions=None, alarm_actions=None, ok_actions=None, insufficient_data_actions=None, unit=None): if not dimensions: dimensions = self.dimensions alarm = MetricAlarm(self.connection, name, self.name, self.namespace, statistic, comparison, threshold, period, evaluation_periods, unit, description, dimensions, alarm_actions, insufficient_data_actions, ok_actions) if self.connection.put_metric_alarm(alarm): return alarm def describe_alarms(self, period=None, statistic=None, dimensions=None, unit=None): return self.connection.describe_alarms_for_metric(self.name, self.namespace, period, statistic, dimensions, unit) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/connection.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents a connection to the EC2 service. """ import base64 import warnings from datetime import datetime from datetime import timedelta import boto from boto.connection import AWSQueryConnection from boto.resultset import ResultSet from boto.ec2.image import Image, ImageAttribute from boto.ec2.instance import Reservation, Instance from boto.ec2.instance import ConsoleOutput, InstanceAttribute from boto.ec2.keypair import KeyPair from boto.ec2.address import Address from boto.ec2.volume import Volume from boto.ec2.snapshot import Snapshot from boto.ec2.snapshot import SnapshotAttribute from boto.ec2.zone import Zone from boto.ec2.securitygroup import SecurityGroup from boto.ec2.regioninfo import RegionInfo from boto.ec2.instanceinfo import InstanceInfo from boto.ec2.reservedinstance import ReservedInstancesOffering from boto.ec2.reservedinstance import ReservedInstance from boto.ec2.spotinstancerequest import SpotInstanceRequest from boto.ec2.spotpricehistory import SpotPriceHistory from boto.ec2.spotdatafeedsubscription import SpotDatafeedSubscription from boto.ec2.bundleinstance import BundleInstanceTask from boto.ec2.placementgroup import PlacementGroup from boto.ec2.tag import Tag from boto.exception import EC2ResponseError #boto.set_stream_logger('ec2') class EC2Connection(AWSQueryConnection): APIVersion = boto.config.get('Boto', 'ec2_version', '2011-01-01') DefaultRegionName = boto.config.get('Boto', 'ec2_region_name', 'us-east-1') DefaultRegionEndpoint = boto.config.get('Boto', 'ec2_region_endpoint', 'ec2.amazonaws.com') ResponseError = EC2ResponseError def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, host=None, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, region=None, path='/', api_version=None, security_token=None): """ Init method to create a new connection to EC2. B{Note:} The host argument is overridden by the host specified in the boto configuration file. """ if not region: region = RegionInfo(self, self.DefaultRegionName, self.DefaultRegionEndpoint) self.region = region AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, self.region.endpoint, debug, https_connection_factory, path, security_token) if api_version: self.APIVersion = api_version def _required_auth_capability(self): return ['ec2'] def get_params(self): """ Returns a dictionary containing the value of of all of the keyword arguments passed when constructing this connection. """ param_names = ['aws_access_key_id', 'aws_secret_access_key', 'is_secure', 'port', 'proxy', 'proxy_port', 'proxy_user', 'proxy_pass', 'debug', 'https_connection_factory'] params = {} for name in param_names: params[name] = getattr(self, name) return params def build_filter_params(self, params, filters): i = 1 for name in filters: aws_name = name if not aws_name.startswith('tag:'): aws_name = name.replace('_', '-') params['Filter.%d.Name' % i] = aws_name value = filters[name] if not isinstance(value, list): value = [value] j = 1 for v in value: params['Filter.%d.Value.%d' % (i,j)] = v j += 1 i += 1 # Image methods def get_all_images(self, image_ids=None, owners=None, executable_by=None, filters=None): """ Retrieve all the EC2 images available on your account. :type image_ids: list :param image_ids: A list of strings with the image IDs wanted :type owners: list :param owners: A list of owner IDs :type executable_by: list :param executable_by: Returns AMIs for which the specified user ID has explicit launch permissions :type filters: dict :param filters: Optional filters that can be used to limit the results returned. Filters are provided in the form of a dictionary consisting of filter names as the key and filter values as the value. The set of allowable filter names/values is dependent on the request being performed. Check the EC2 API guide for details. :rtype: list :return: A list of :class:`boto.ec2.image.Image` """ params = {} if image_ids: self.build_list_params(params, image_ids, 'ImageId') if owners: self.build_list_params(params, owners, 'Owner') if executable_by: self.build_list_params(params, executable_by, 'ExecutableBy') if filters: self.build_filter_params(params, filters) return self.get_list('DescribeImages', params, [('item', Image)], verb='POST') def get_all_kernels(self, kernel_ids=None, owners=None): """ Retrieve all the EC2 kernels available on your account. Constructs a filter to allow the processing to happen server side. :type kernel_ids: list :param kernel_ids: A list of strings with the image IDs wanted :type owners: list :param owners: A list of owner IDs :rtype: list :return: A list of :class:`boto.ec2.image.Image` """ params = {} if kernel_ids: self.build_list_params(params, kernel_ids, 'ImageId') if owners: self.build_list_params(params, owners, 'Owner') filter = {'image-type' : 'kernel'} self.build_filter_params(params, filter) return self.get_list('DescribeImages', params, [('item', Image)], verb='POST') def get_all_ramdisks(self, ramdisk_ids=None, owners=None): """ Retrieve all the EC2 ramdisks available on your account. Constructs a filter to allow the processing to happen server side. :type ramdisk_ids: list :param ramdisk_ids: A list of strings with the image IDs wanted :type owners: list :param owners: A list of owner IDs :rtype: list :return: A list of :class:`boto.ec2.image.Image` """ params = {} if ramdisk_ids: self.build_list_params(params, ramdisk_ids, 'ImageId') if owners: self.build_list_params(params, owners, 'Owner') filter = {'image-type' : 'ramdisk'} self.build_filter_params(params, filter) return self.get_list('DescribeImages', params, [('item', Image)], verb='POST') def get_image(self, image_id): """ Shortcut method to retrieve a specific image (AMI). :type image_id: string :param image_id: the ID of the Image to retrieve :rtype: :class:`boto.ec2.image.Image` :return: The EC2 Image specified or None if the image is not found """ try: return self.get_all_images(image_ids=[image_id])[0] except IndexError: # None of those images available return None def register_image(self, name=None, description=None, image_location=None, architecture=None, kernel_id=None, ramdisk_id=None, root_device_name=None, block_device_map=None): """ Register an image. :type name: string :param name: The name of the AMI. Valid only for EBS-based images. :type description: string :param description: The description of the AMI. :type image_location: string :param image_location: Full path to your AMI manifest in Amazon S3 storage. Only used for S3-based AMI's. :type architecture: string :param architecture: The architecture of the AMI. Valid choices are: i386 | x86_64 :type kernel_id: string :param kernel_id: The ID of the kernel with which to launch the instances :type root_device_name: string :param root_device_name: The root device name (e.g. /dev/sdh) :type block_device_map: :class:`boto.ec2.blockdevicemapping.BlockDeviceMapping` :param block_device_map: A BlockDeviceMapping data structure describing the EBS volumes associated with the Image. :rtype: string :return: The new image id """ params = {} if name: params['Name'] = name if description: params['Description'] = description if architecture: params['Architecture'] = architecture if kernel_id: params['KernelId'] = kernel_id if ramdisk_id: params['RamdiskId'] = ramdisk_id if image_location: params['ImageLocation'] = image_location if root_device_name: params['RootDeviceName'] = root_device_name if block_device_map: block_device_map.build_list_params(params) rs = self.get_object('RegisterImage', params, ResultSet, verb='POST') image_id = getattr(rs, 'imageId', None) return image_id def deregister_image(self, image_id, delete_snapshot=False): """ Unregister an AMI. :type image_id: string :param image_id: the ID of the Image to unregister :type delete_snapshot: bool :param delete_snapshot: Set to True if we should delete the snapshot associated with an EBS volume mounted at /dev/sda1 :rtype: bool :return: True if successful """ snapshot_id = None if delete_snapshot: image = self.get_image(image_id) for key in image.block_device_mapping: if key == "/dev/sda1": snapshot_id = image.block_device_mapping[key].snapshot_id break result = self.get_status('DeregisterImage', {'ImageId':image_id}, verb='POST') if result and snapshot_id: return result and self.delete_snapshot(snapshot_id) return result def create_image(self, instance_id, name, description=None, no_reboot=False): """ Will create an AMI from the instance in the running or stopped state. :type instance_id: string :param instance_id: the ID of the instance to image. :type name: string :param name: The name of the new image :type description: string :param description: An optional human-readable string describing the contents and purpose of the AMI. :type no_reboot: bool :param no_reboot: An optional flag indicating that the bundling process should not attempt to shutdown the instance before bundling. If this flag is True, the responsibility of maintaining file system integrity is left to the owner of the instance. :rtype: string :return: The new image id """ params = {'InstanceId' : instance_id, 'Name' : name} if description: params['Description'] = description if no_reboot: params['NoReboot'] = 'true' img = self.get_object('CreateImage', params, Image, verb='POST') return img.id # ImageAttribute methods def get_image_attribute(self, image_id, attribute='launchPermission'): """ Gets an attribute from an image. :type image_id: string :param image_id: The Amazon image id for which you want info about :type attribute: string :param attribute: The attribute you need information about. Valid choices are: * launchPermission * productCodes * blockDeviceMapping :rtype: :class:`boto.ec2.image.ImageAttribute` :return: An ImageAttribute object representing the value of the attribute requested """ params = {'ImageId' : image_id, 'Attribute' : attribute} return self.get_object('DescribeImageAttribute', params, ImageAttribute, verb='POST') def modify_image_attribute(self, image_id, attribute='launchPermission', operation='add', user_ids=None, groups=None, product_codes=None): """ Changes an attribute of an image. :type image_id: string :param image_id: The image id you wish to change :type attribute: string :param attribute: The attribute you wish to change :type operation: string :param operation: Either add or remove (this is required for changing launchPermissions) :type user_ids: list :param user_ids: The Amazon IDs of users to add/remove attributes :type groups: list :param groups: The groups to add/remove attributes :type product_codes: list :param product_codes: Amazon DevPay product code. Currently only one product code can be associated with an AMI. Once set, the product code cannot be changed or reset. """ params = {'ImageId' : image_id, 'Attribute' : attribute, 'OperationType' : operation} if user_ids: self.build_list_params(params, user_ids, 'UserId') if groups: self.build_list_params(params, groups, 'UserGroup') if product_codes: self.build_list_params(params, product_codes, 'ProductCode') return self.get_status('ModifyImageAttribute', params, verb='POST') def reset_image_attribute(self, image_id, attribute='launchPermission'): """ Resets an attribute of an AMI to its default value. :type image_id: string :param image_id: ID of the AMI for which an attribute will be described :type attribute: string :param attribute: The attribute to reset :rtype: bool :return: Whether the operation succeeded or not """ params = {'ImageId' : image_id, 'Attribute' : attribute} return self.get_status('ResetImageAttribute', params, verb='POST') # Instance methods def get_all_instances(self, instance_ids=None, filters=None): """ Retrieve all the instances associated with your account. :type instance_ids: list :param instance_ids: A list of strings of instance IDs :type filters: dict :param filters: Optional filters that can be used to limit the results returned. Filters are provided in the form of a dictionary consisting of filter names as the key and filter values as the value. The set of allowable filter names/values is dependent on the request being performed. Check the EC2 API guide for details. :rtype: list :return: A list of :class:`boto.ec2.instance.Reservation` """ params = {} if instance_ids: self.build_list_params(params, instance_ids, 'InstanceId') if filters: if 'group-id' in filters: warnings.warn("The group-id filter now requires a security " "group identifier (sg-*) instead of a group " "name. To filter by group name use the " "'group-name' filter instead.", UserWarning) self.build_filter_params(params, filters) return self.get_list('DescribeInstances', params, [('item', Reservation)], verb='POST') def run_instances(self, image_id, min_count=1, max_count=1, key_name=None, security_groups=None, user_data=None, addressing_type=None, instance_type='m1.small', placement=None, kernel_id=None, ramdisk_id=None, monitoring_enabled=False, subnet_id=None, block_device_map=None, disable_api_termination=False, instance_initiated_shutdown_behavior=None, private_ip_address=None, placement_group=None, client_token=None, security_group_ids=None): """ Runs an image on EC2. :type image_id: string :param image_id: The ID of the image to run :type min_count: int :param min_count: The minimum number of instances to launch :type max_count: int :param max_count: The maximum number of instances to launch :type key_name: string :param key_name: The name of the key pair with which to launch instances :type security_groups: list of strings :param security_groups: The names of the security groups with which to associate instances :type user_data: string :param user_data: The user data passed to the launched instances :type instance_type: string :param instance_type: The type of instance to run: * m1.small * m1.large * m1.xlarge * c1.medium * c1.xlarge * m2.xlarge * m2.2xlarge * m2.4xlarge * cc1.4xlarge * t1.micro :type placement: string :param placement: The availability zone in which to launch the instances :type kernel_id: string :param kernel_id: The ID of the kernel with which to launch the instances :type ramdisk_id: string :param ramdisk_id: The ID of the RAM disk with which to launch the instances :type monitoring_enabled: bool :param monitoring_enabled: Enable CloudWatch monitoring on the instance. :type subnet_id: string :param subnet_id: The subnet ID within which to launch the instances for VPC. :type private_ip_address: string :param private_ip_address: If you're using VPC, you can optionally use this parameter to assign the instance a specific available IP address from the subnet (e.g., 10.0.0.25). :type block_device_map: :class:`boto.ec2.blockdevicemapping.BlockDeviceMapping` :param block_device_map: A BlockDeviceMapping data structure describing the EBS volumes associated with the Image. :type disable_api_termination: bool :param disable_api_termination: If True, the instances will be locked and will not be able to be terminated via the API. :type instance_initiated_shutdown_behavior: string :param instance_initiated_shutdown_behavior: Specifies whether the instance stops or terminates on instance-initiated shutdown. Valid values are: * stop * terminate :type placement_group: string :param placement_group: If specified, this is the name of the placement group in which the instance(s) will be launched. :type client_token: string :param client_token: Unique, case-sensitive identifier you provide to ensure idempotency of the request. Maximum 64 ASCII characters :rtype: Reservation :return: The :class:`boto.ec2.instance.Reservation` associated with the request for machines :type security_group_ids: list of strings :param security_group_ids: The ID of the VPC security groups with which to associate instances """ params = {'ImageId':image_id, 'MinCount':min_count, 'MaxCount': max_count} if key_name: params['KeyName'] = key_name if security_group_ids: l = [] for group in security_group_ids: if isinstance(group, SecurityGroup): l.append(group.name) else: l.append(group) self.build_list_params(params, l, 'SecurityGroupId') if security_groups: l = [] for group in security_groups: if isinstance(group, SecurityGroup): l.append(group.name) else: l.append(group) self.build_list_params(params, l, 'SecurityGroup') if user_data: params['UserData'] = base64.b64encode(user_data) if addressing_type: params['AddressingType'] = addressing_type if instance_type: params['InstanceType'] = instance_type if placement: params['Placement.AvailabilityZone'] = placement if placement_group: params['Placement.GroupName'] = placement_group if kernel_id: params['KernelId'] = kernel_id if ramdisk_id: params['RamdiskId'] = ramdisk_id if monitoring_enabled: params['Monitoring.Enabled'] = 'true' if subnet_id: params['SubnetId'] = subnet_id if private_ip_address: params['PrivateIpAddress'] = private_ip_address if block_device_map: block_device_map.build_list_params(params) if disable_api_termination: params['DisableApiTermination'] = 'true' if instance_initiated_shutdown_behavior: val = instance_initiated_shutdown_behavior params['InstanceInitiatedShutdownBehavior'] = val if client_token: params['ClientToken'] = client_token return self.get_object('RunInstances', params, Reservation, verb='POST') def terminate_instances(self, instance_ids=None): """ Terminate the instances specified :type instance_ids: list :param instance_ids: A list of strings of the Instance IDs to terminate :rtype: list :return: A list of the instances terminated """ params = {} if instance_ids: self.build_list_params(params, instance_ids, 'InstanceId') return self.get_list('TerminateInstances', params, [('item', Instance)], verb='POST') def stop_instances(self, instance_ids=None, force=False): """ Stop the instances specified :type instance_ids: list :param instance_ids: A list of strings of the Instance IDs to stop :type force: bool :param force: Forces the instance to stop :rtype: list :return: A list of the instances stopped """ params = {} if force: params['Force'] = 'true' if instance_ids: self.build_list_params(params, instance_ids, 'InstanceId') return self.get_list('StopInstances', params, [('item', Instance)], verb='POST') def start_instances(self, instance_ids=None): """ Start the instances specified :type instance_ids: list :param instance_ids: A list of strings of the Instance IDs to start :rtype: list :return: A list of the instances started """ params = {} if instance_ids: self.build_list_params(params, instance_ids, 'InstanceId') return self.get_list('StartInstances', params, [('item', Instance)], verb='POST') def get_console_output(self, instance_id): """ Retrieves the console output for the specified instance. :type instance_id: string :param instance_id: The instance ID of a running instance on the cloud. :rtype: :class:`boto.ec2.instance.ConsoleOutput` :return: The console output as a ConsoleOutput object """ params = {} self.build_list_params(params, [instance_id], 'InstanceId') return self.get_object('GetConsoleOutput', params, ConsoleOutput, verb='POST') def reboot_instances(self, instance_ids=None): """ Reboot the specified instances. :type instance_ids: list :param instance_ids: The instances to terminate and reboot """ params = {} if instance_ids: self.build_list_params(params, instance_ids, 'InstanceId') return self.get_status('RebootInstances', params) def confirm_product_instance(self, product_code, instance_id): params = {'ProductCode' : product_code, 'InstanceId' : instance_id} rs = self.get_object('ConfirmProductInstance', params, ResultSet, verb='POST') return (rs.status, rs.ownerId) # InstanceAttribute methods def get_instance_attribute(self, instance_id, attribute): """ Gets an attribute from an instance. :type instance_id: string :param instance_id: The Amazon id of the instance :type attribute: string :param attribute: The attribute you need information about Valid choices are: * instanceType|kernel|ramdisk|userData| * disableApiTermination| * instanceInitiatedShutdownBehavior| * rootDeviceName|blockDeviceMapping :rtype: :class:`boto.ec2.image.InstanceAttribute` :return: An InstanceAttribute object representing the value of the attribute requested """ params = {'InstanceId' : instance_id} if attribute: params['Attribute'] = attribute return self.get_object('DescribeInstanceAttribute', params, InstanceAttribute, verb='POST') def modify_instance_attribute(self, instance_id, attribute, value): """ Changes an attribute of an instance :type instance_id: string :param instance_id: The instance id you wish to change :type attribute: string :param attribute: The attribute you wish to change. * AttributeName - Expected value (default) * instanceType - A valid instance type (m1.small) * kernel - Kernel ID (None) * ramdisk - Ramdisk ID (None) * userData - Base64 encoded String (None) * disableApiTermination - Boolean (true) * instanceInitiatedShutdownBehavior - stop|terminate * rootDeviceName - device name (None) :type value: string :param value: The new value for the attribute :rtype: bool :return: Whether the operation succeeded or not """ # Allow a bool to be passed in for value of disableApiTermination if attribute == 'disableApiTermination': if isinstance(value, bool): if value: value = 'true' else: value = 'false' params = {'InstanceId' : instance_id, 'Attribute' : attribute, 'Value' : value} return self.get_status('ModifyInstanceAttribute', params, verb='POST') def reset_instance_attribute(self, instance_id, attribute): """ Resets an attribute of an instance to its default value. :type instance_id: string :param instance_id: ID of the instance :type attribute: string :param attribute: The attribute to reset. Valid values are: kernel|ramdisk :rtype: bool :return: Whether the operation succeeded or not """ params = {'InstanceId' : instance_id, 'Attribute' : attribute} return self.get_status('ResetInstanceAttribute', params, verb='POST') # Spot Instances def get_all_spot_instance_requests(self, request_ids=None, filters=None): """ Retrieve all the spot instances requests associated with your account. :type request_ids: list :param request_ids: A list of strings of spot instance request IDs :type filters: dict :param filters: Optional filters that can be used to limit the results returned. Filters are provided in the form of a dictionary consisting of filter names as the key and filter values as the value. The set of allowable filter names/values is dependent on the request being performed. Check the EC2 API guide for details. :rtype: list :return: A list of :class:`boto.ec2.spotinstancerequest.SpotInstanceRequest` """ params = {} if request_ids: self.build_list_params(params, request_ids, 'SpotInstanceRequestId') if filters: if 'launch.group-id' in filters: warnings.warn("The 'launch.group-id' filter now requires a " "security group id (sg-*) and no longer supports " "filtering by group name. Please update your " "filters accordingly.", UserWarning) self.build_filter_params(params, filters) return self.get_list('DescribeSpotInstanceRequests', params, [('item', SpotInstanceRequest)], verb='POST') def get_spot_price_history(self, start_time=None, end_time=None, instance_type=None, product_description=None, availability_zone=None): """ Retrieve the recent history of spot instances pricing. :type start_time: str :param start_time: An indication of how far back to provide price changes for. An ISO8601 DateTime string. :type end_time: str :param end_time: An indication of how far forward to provide price changes for. An ISO8601 DateTime string. :type instance_type: str :param instance_type: Filter responses to a particular instance type. :type product_description: str :param product_description: Filter responses to a particular platform. Valid values are currently: "Linux/UNIX", "SUSE Linux", and "Windows" :type availability_zone: str :param availability_zone: The availability zone for which prices should be returned :rtype: list :return: A list tuples containing price and timestamp. """ params = {} if start_time: params['StartTime'] = start_time if end_time: params['EndTime'] = end_time if instance_type: params['InstanceType'] = instance_type if product_description: params['ProductDescription'] = product_description if availability_zone: params['AvailabilityZone'] = availability_zone return self.get_list('DescribeSpotPriceHistory', params, [('item', SpotPriceHistory)], verb='POST') def request_spot_instances(self, price, image_id, count=1, type='one-time', valid_from=None, valid_until=None, launch_group=None, availability_zone_group=None, key_name=None, security_groups=None, user_data=None, addressing_type=None, instance_type='m1.small', placement=None, kernel_id=None, ramdisk_id=None, monitoring_enabled=False, subnet_id=None, block_device_map=None): """ Request instances on the spot market at a particular price. :type price: str :param price: The maximum price of your bid :type image_id: string :param image_id: The ID of the image to run :type count: int :param count: The of instances to requested :type type: str :param type: Type of request. Can be 'one-time' or 'persistent'. Default is one-time. :type valid_from: str :param valid_from: Start date of the request. An ISO8601 time string. :type valid_until: str :param valid_until: End date of the request. An ISO8601 time string. :type launch_group: str :param launch_group: If supplied, all requests will be fulfilled as a group. :type availability_zone_group: str :param availability_zone_group: If supplied, all requests will be fulfilled within a single availability zone. :type key_name: string :param key_name: The name of the key pair with which to launch instances :type security_groups: list of strings :param security_groups: The names of the security groups with which to associate instances :type user_data: string :param user_data: The user data passed to the launched instances :type instance_type: string :param instance_type: The type of instance to run: * m1.small * m1.large * m1.xlarge * c1.medium * c1.xlarge * m2.xlarge * m2.2xlarge * m2.4xlarge * cc1.4xlarge * t1.micro :type placement: string :param placement: The availability zone in which to launch the instances :type kernel_id: string :param kernel_id: The ID of the kernel with which to launch the instances :type ramdisk_id: string :param ramdisk_id: The ID of the RAM disk with which to launch the instances :type monitoring_enabled: bool :param monitoring_enabled: Enable CloudWatch monitoring on the instance. :type subnet_id: string :param subnet_id: The subnet ID within which to launch the instances for VPC. :type block_device_map: :class:`boto.ec2.blockdevicemapping.BlockDeviceMapping` :param block_device_map: A BlockDeviceMapping data structure describing the EBS volumes associated with the Image. :rtype: Reservation :return: The :class:`boto.ec2.spotinstancerequest.SpotInstanceRequest` associated with the request for machines """ params = {'LaunchSpecification.ImageId':image_id, 'Type' : type, 'SpotPrice' : price} if count: params['InstanceCount'] = count if valid_from: params['ValidFrom'] = valid_from if valid_until: params['ValidUntil'] = valid_until if launch_group: params['LaunchGroup'] = launch_group if availability_zone_group: params['AvailabilityZoneGroup'] = availability_zone_group if key_name: params['LaunchSpecification.KeyName'] = key_name if security_groups: l = [] for group in security_groups: if isinstance(group, SecurityGroup): l.append(group.name) else: l.append(group) self.build_list_params(params, l, 'LaunchSpecification.SecurityGroup') if user_data: params['LaunchSpecification.UserData'] = base64.b64encode(user_data) if addressing_type: params['LaunchSpecification.AddressingType'] = addressing_type if instance_type: params['LaunchSpecification.InstanceType'] = instance_type if placement: params['LaunchSpecification.Placement.AvailabilityZone'] = placement if kernel_id: params['LaunchSpecification.KernelId'] = kernel_id if ramdisk_id: params['LaunchSpecification.RamdiskId'] = ramdisk_id if monitoring_enabled: params['LaunchSpecification.Monitoring.Enabled'] = 'true' if subnet_id: params['LaunchSpecification.SubnetId'] = subnet_id if block_device_map: block_device_map.build_list_params(params, 'LaunchSpecification.') return self.get_list('RequestSpotInstances', params, [('item', SpotInstanceRequest)], verb='POST') def cancel_spot_instance_requests(self, request_ids): """ Cancel the specified Spot Instance Requests. :type request_ids: list :param request_ids: A list of strings of the Request IDs to terminate :rtype: list :return: A list of the instances terminated """ params = {} if request_ids: self.build_list_params(params, request_ids, 'SpotInstanceRequestId') return self.get_list('CancelSpotInstanceRequests', params, [('item', Instance)], verb='POST') def get_spot_datafeed_subscription(self): """ Return the current spot instance data feed subscription associated with this account, if any. :rtype: :class:`boto.ec2.spotdatafeedsubscription.SpotDatafeedSubscription` :return: The datafeed subscription object or None """ return self.get_object('DescribeSpotDatafeedSubscription', None, SpotDatafeedSubscription, verb='POST') def create_spot_datafeed_subscription(self, bucket, prefix): """ Create a spot instance datafeed subscription for this account. :type bucket: str or unicode :param bucket: The name of the bucket where spot instance data will be written. The account issuing this request must have FULL_CONTROL access to the bucket specified in the request. :type prefix: str or unicode :param prefix: An optional prefix that will be pre-pended to all data files written to the bucket. :rtype: :class:`boto.ec2.spotdatafeedsubscription.SpotDatafeedSubscription` :return: The datafeed subscription object or None """ params = {'Bucket' : bucket} if prefix: params['Prefix'] = prefix return self.get_object('CreateSpotDatafeedSubscription', params, SpotDatafeedSubscription, verb='POST') def delete_spot_datafeed_subscription(self): """ Delete the current spot instance data feed subscription associated with this account :rtype: bool :return: True if successful """ return self.get_status('DeleteSpotDatafeedSubscription', None, verb='POST') # Zone methods def get_all_zones(self, zones=None, filters=None): """ Get all Availability Zones associated with the current region. :type zones: list :param zones: Optional list of zones. If this list is present, only the Zones associated with these zone names will be returned. :type filters: dict :param filters: Optional filters that can be used to limit the results returned. Filters are provided in the form of a dictionary consisting of filter names as the key and filter values as the value. The set of allowable filter names/values is dependent on the request being performed. Check the EC2 API guide for details. :rtype: list of :class:`boto.ec2.zone.Zone` :return: The requested Zone objects """ params = {} if zones: self.build_list_params(params, zones, 'ZoneName') if filters: self.build_filter_params(params, filters) return self.get_list('DescribeAvailabilityZones', params, [('item', Zone)], verb='POST') # Address methods def get_all_addresses(self, addresses=None, filters=None, allocation_ids=None): """ Get all EIP's associated with the current credentials. :type addresses: list :param addresses: Optional list of addresses. If this list is present, only the Addresses associated with these addresses will be returned. :type filters: dict :param filters: Optional filters that can be used to limit the results returned. Filters are provided in the form of a dictionary consisting of filter names as the key and filter values as the value. The set of allowable filter names/values is dependent on the request being performed. Check the EC2 API guide for details. :type allocation_ids: list :param allocation_ids: Optional list of allocation IDs. If this list is present, only the Addresses associated with the given allocation IDs will be returned. :rtype: list of :class:`boto.ec2.address.Address` :return: The requested Address objects """ params = {} if addresses: self.build_list_params(params, addresses, 'PublicIp') if allocation_ids: self.build_list_params(params, allocation_ids, 'AllocationId') if filters: self.build_filter_params(params, filters) return self.get_list('DescribeAddresses', params, [('item', Address)], verb='POST') def allocate_address(self, domain=None): """ Allocate a new Elastic IP address and associate it with your account. :rtype: :class:`boto.ec2.address.Address` :return: The newly allocated Address """ params = {} if domain is not None: params['Domain'] = domain return self.get_object('AllocateAddress', params, Address, verb='POST') def associate_address(self, instance_id, public_ip=None, allocation_id=None): """ Associate an Elastic IP address with a currently running instance. This requires one of ``public_ip`` or ``allocation_id`` depending on if you're associating a VPC address or a plain EC2 address. :type instance_id: string :param instance_id: The ID of the instance :type public_ip: string :param public_ip: The public IP address for EC2 based allocations. :type allocation_id: string :param allocation_id: The allocation ID for a VPC-based elastic IP. :rtype: bool :return: True if successful """ params = { 'InstanceId' : instance_id } if public_ip is not None: params['PublicIp'] = public_ip elif allocation_id is not None: params['AllocationId'] = allocation_id return self.get_status('AssociateAddress', params, verb='POST') def disassociate_address(self, public_ip=None, association_id=None): """ Disassociate an Elastic IP address from a currently running instance. :type public_ip: string :param public_ip: The public IP address for EC2 elastic IPs. :type association_id: string :param association_id: The association ID for a VPC based elastic ip. :rtype: bool :return: True if successful """ params = {} if public_ip is not None: params['PublicIp'] = public_ip elif association_id is not None: params['AssociationId'] = association_id return self.get_status('DisassociateAddress', params, verb='POST') def release_address(self, public_ip=None, allocation_id=None): """ Free up an Elastic IP address. :type public_ip: string :param public_ip: The public IP address for EC2 elastic IPs. :type allocation_id: string :param allocation_id: The ID for VPC elastic IPs. :rtype: bool :return: True if successful """ params = {} if public_ip is not None: params['PublicIp'] = public_ip elif allocation_id is not None: params['AllocationId'] = allocation_id return self.get_status('ReleaseAddress', params, verb='POST') # Volume methods def get_all_volumes(self, volume_ids=None, filters=None): """ Get all Volumes associated with the current credentials. :type volume_ids: list :param volume_ids: Optional list of volume ids. If this list is present, only the volumes associated with these volume ids will be returned. :type filters: dict :param filters: Optional filters that can be used to limit the results returned. Filters are provided in the form of a dictionary consisting of filter names as the key and filter values as the value. The set of allowable filter names/values is dependent on the request being performed. Check the EC2 API guide for details. :rtype: list of :class:`boto.ec2.volume.Volume` :return: The requested Volume objects """ params = {} if volume_ids: self.build_list_params(params, volume_ids, 'VolumeId') if filters: self.build_filter_params(params, filters) return self.get_list('DescribeVolumes', params, [('item', Volume)], verb='POST') def create_volume(self, size, zone, snapshot=None): """ Create a new EBS Volume. :type size: int :param size: The size of the new volume, in GiB :type zone: string or :class:`boto.ec2.zone.Zone` :param zone: The availability zone in which the Volume will be created. :type snapshot: string or :class:`boto.ec2.snapshot.Snapshot` :param snapshot: The snapshot from which the new Volume will be created. """ if isinstance(zone, Zone): zone = zone.name params = {'AvailabilityZone' : zone} if size: params['Size'] = size if snapshot: if isinstance(snapshot, Snapshot): snapshot = snapshot.id params['SnapshotId'] = snapshot return self.get_object('CreateVolume', params, Volume, verb='POST') def delete_volume(self, volume_id): """ Delete an EBS volume. :type volume_id: str :param volume_id: The ID of the volume to be delete. :rtype: bool :return: True if successful """ params = {'VolumeId': volume_id} return self.get_status('DeleteVolume', params, verb='POST') def attach_volume(self, volume_id, instance_id, device): """ Attach an EBS volume to an EC2 instance. :type volume_id: str :param volume_id: The ID of the EBS volume to be attached. :type instance_id: str :param instance_id: The ID of the EC2 instance to which it will be attached. :type device: str :param device: The device on the instance through which the volume will be exposted (e.g. /dev/sdh) :rtype: bool :return: True if successful """ params = {'InstanceId' : instance_id, 'VolumeId' : volume_id, 'Device' : device} return self.get_status('AttachVolume', params, verb='POST') def detach_volume(self, volume_id, instance_id=None, device=None, force=False): """ Detach an EBS volume from an EC2 instance. :type volume_id: str :param volume_id: The ID of the EBS volume to be attached. :type instance_id: str :param instance_id: The ID of the EC2 instance from which it will be detached. :type device: str :param device: The device on the instance through which the volume is exposted (e.g. /dev/sdh) :type force: bool :param force: Forces detachment if the previous detachment attempt did not occur cleanly. This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance will not have an opportunity to flush file system caches nor file system meta data. If you use this option, you must perform file system check and repair procedures. :rtype: bool :return: True if successful """ params = {'VolumeId' : volume_id} if instance_id: params['InstanceId'] = instance_id if device: params['Device'] = device if force: params['Force'] = 'true' return self.get_status('DetachVolume', params, verb='POST') # Snapshot methods def get_all_snapshots(self, snapshot_ids=None, owner=None, restorable_by=None, filters=None): """ Get all EBS Snapshots associated with the current credentials. :type snapshot_ids: list :param snapshot_ids: Optional list of snapshot ids. If this list is present, only the Snapshots associated with these snapshot ids will be returned. :type owner: str :param owner: If present, only the snapshots owned by the specified user will be returned. Valid values are: * self * amazon * AWS Account ID :type restorable_by: str :param restorable_by: If present, only the snapshots that are restorable by the specified account id will be returned. :type filters: dict :param filters: Optional filters that can be used to limit the results returned. Filters are provided in the form of a dictionary consisting of filter names as the key and filter values as the value. The set of allowable filter names/values is dependent on the request being performed. Check the EC2 API guide for details. :rtype: list of :class:`boto.ec2.snapshot.Snapshot` :return: The requested Snapshot objects """ params = {} if snapshot_ids: self.build_list_params(params, snapshot_ids, 'SnapshotId') if owner: params['Owner'] = owner if restorable_by: params['RestorableBy'] = restorable_by if filters: self.build_filter_params(params, filters) return self.get_list('DescribeSnapshots', params, [('item', Snapshot)], verb='POST') def create_snapshot(self, volume_id, description=None): """ Create a snapshot of an existing EBS Volume. :type volume_id: str :param volume_id: The ID of the volume to be snapshot'ed :type description: str :param description: A description of the snapshot. Limited to 255 characters. :rtype: bool :return: True if successful """ params = {'VolumeId' : volume_id} if description: params['Description'] = description[0:255] snapshot = self.get_object('CreateSnapshot', params, Snapshot, verb='POST') volume = self.get_all_volumes([volume_id])[0] volume_name = volume.tags.get('Name') if volume_name: snapshot.add_tag('Name', volume_name) return snapshot def delete_snapshot(self, snapshot_id): params = {'SnapshotId': snapshot_id} return self.get_status('DeleteSnapshot', params, verb='POST') def trim_snapshots(self, hourly_backups = 8, daily_backups = 7, weekly_backups = 4): """ Trim excess snapshots, based on when they were taken. More current snapshots are retained, with the number retained decreasing as you move back in time. If ebs volumes have a 'Name' tag with a value, their snapshots will be assigned the same tag when they are created. The values of the 'Name' tags for snapshots are used by this function to group snapshots taken from the same volume (or from a series of like-named volumes over time) for trimming. For every group of like-named snapshots, this function retains the newest and oldest snapshots, as well as, by default, the first snapshots taken in each of the last eight hours, the first snapshots taken in each of the last seven days, the first snapshots taken in the last 4 weeks (counting Midnight Sunday morning as the start of the week), and the first snapshot from the first Sunday of each month forever. :type hourly_backups: int :param hourly_backups: How many recent hourly backups should be saved. :type daily_backups: int :param daily_backups: How many recent daily backups should be saved. :type weekly_backups: int :param weekly_backups: How many recent weekly backups should be saved. """ # This function first builds up an ordered list of target times # that snapshots should be saved for (last 8 hours, last 7 days, etc.). # Then a map of snapshots is constructed, with the keys being # the snapshot / volume names and the values being arrays of # chronologically sorted snapshots. # Finally, for each array in the map, we go through the snapshot # array and the target time array in an interleaved fashion, # deleting snapshots whose start_times don't immediately follow a # target time (we delete a snapshot if there's another snapshot # that was made closer to the preceding target time). now = datetime.utcnow() last_hour = datetime(now.year, now.month, now.day, now.hour) last_midnight = datetime(now.year, now.month, now.day) last_sunday = datetime(now.year, now.month, now.day) - timedelta(days = (now.weekday() + 1) % 7) start_of_month = datetime(now.year, now.month, 1) target_backup_times = [] # there are no snapshots older than 1/1/2007 oldest_snapshot_date = datetime(2007, 1, 1) for hour in range(0, hourly_backups): target_backup_times.append(last_hour - timedelta(hours = hour)) for day in range(0, daily_backups): target_backup_times.append(last_midnight - timedelta(days = day)) for week in range(0, weekly_backups): target_backup_times.append(last_sunday - timedelta(weeks = week)) one_day = timedelta(days = 1) while start_of_month > oldest_snapshot_date: # append the start of the month to the list of # snapshot dates to save: target_backup_times.append(start_of_month) # there's no timedelta setting for one month, so instead: # decrement the day by one, so we go to the final day of # the previous month... start_of_month -= one_day # ... and then go to the first day of that previous month: start_of_month = datetime(start_of_month.year, start_of_month.month, 1) temp = [] for t in target_backup_times: if temp.__contains__(t) == False: temp.append(t) target_backup_times = temp # make the oldeest dates first, and make sure the month start # and last four week's start are in the proper order target_backup_times.sort() # get all the snapshots, sort them by date and time, and # organize them into one array for each volume: all_snapshots = self.get_all_snapshots(owner = 'self') all_snapshots.sort(cmp = lambda x, y: cmp(x.start_time, y.start_time)) snaps_for_each_volume = {} for snap in all_snapshots: # the snapshot name and the volume name are the same. # The snapshot name is set from the volume # name at the time the snapshot is taken volume_name = snap.tags.get('Name') if volume_name: # only examine snapshots that have a volume name snaps_for_volume = snaps_for_each_volume.get(volume_name) if not snaps_for_volume: snaps_for_volume = [] snaps_for_each_volume[volume_name] = snaps_for_volume snaps_for_volume.append(snap) # Do a running comparison of snapshot dates to desired time #periods, keeping the oldest snapshot in each # time period and deleting the rest: for volume_name in snaps_for_each_volume: snaps = snaps_for_each_volume[volume_name] snaps = snaps[:-1] # never delete the newest snapshot time_period_number = 0 snap_found_for_this_time_period = False for snap in snaps: check_this_snap = True while check_this_snap and time_period_number < target_backup_times.__len__(): snap_date = datetime.strptime(snap.start_time, '%Y-%m-%dT%H:%M:%S.000Z') if snap_date < target_backup_times[time_period_number]: # the snap date is before the cutoff date. # Figure out if it's the first snap in this # date range and act accordingly (since both #date the date ranges and the snapshots # are sorted chronologically, we know this #snapshot isn't in an earlier date range): if snap_found_for_this_time_period == True: if not snap.tags.get('preserve_snapshot'): # as long as the snapshot wasn't marked # with the 'preserve_snapshot' tag, delete it: try: self.delete_snapshot(snap.id) boto.log.info('Trimmed snapshot %s (%s)' % (snap.tags['Name'], snap.start_time)) except EC2ResponseError: 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)) # go on and look at the next snapshot, #leaving the time period alone else: # this was the first snapshot found for this #time period. Leave it alone and look at the # next snapshot: snap_found_for_this_time_period = True check_this_snap = False else: # the snap is after the cutoff date. Check it # against the next cutoff date time_period_number += 1 snap_found_for_this_time_period = False def get_snapshot_attribute(self, snapshot_id, attribute='createVolumePermission'): """ Get information about an attribute of a snapshot. Only one attribute can be specified per call. :type snapshot_id: str :param snapshot_id: The ID of the snapshot. :type attribute: str :param attribute: The requested attribute. Valid values are: * createVolumePermission :rtype: list of :class:`boto.ec2.snapshotattribute.SnapshotAttribute` :return: The requested Snapshot attribute """ params = {'Attribute' : attribute} if snapshot_id: params['SnapshotId'] = snapshot_id return self.get_object('DescribeSnapshotAttribute', params, SnapshotAttribute, verb='POST') def modify_snapshot_attribute(self, snapshot_id, attribute='createVolumePermission', operation='add', user_ids=None, groups=None): """ Changes an attribute of an image. :type snapshot_id: string :param snapshot_id: The snapshot id you wish to change :type attribute: string :param attribute: The attribute you wish to change. Valid values are: createVolumePermission :type operation: string :param operation: Either add or remove (this is required for changing snapshot ermissions) :type user_ids: list :param user_ids: The Amazon IDs of users to add/remove attributes :type groups: list :param groups: The groups to add/remove attributes. The only valid value at this time is 'all'. """ params = {'SnapshotId' : snapshot_id, 'Attribute' : attribute, 'OperationType' : operation} if user_ids: self.build_list_params(params, user_ids, 'UserId') if groups: self.build_list_params(params, groups, 'UserGroup') return self.get_status('ModifySnapshotAttribute', params, verb='POST') def reset_snapshot_attribute(self, snapshot_id, attribute='createVolumePermission'): """ Resets an attribute of a snapshot to its default value. :type snapshot_id: string :param snapshot_id: ID of the snapshot :type attribute: string :param attribute: The attribute to reset :rtype: bool :return: Whether the operation succeeded or not """ params = {'SnapshotId' : snapshot_id, 'Attribute' : attribute} return self.get_status('ResetSnapshotAttribute', params, verb='POST') # Keypair methods def get_all_key_pairs(self, keynames=None, filters=None): """ Get all key pairs associated with your account. :type keynames: list :param keynames: A list of the names of keypairs to retrieve. If not provided, all key pairs will be returned. :type filters: dict :param filters: Optional filters that can be used to limit the results returned. Filters are provided in the form of a dictionary consisting of filter names as the key and filter values as the value. The set of allowable filter names/values is dependent on the request being performed. Check the EC2 API guide for details. :rtype: list :return: A list of :class:`boto.ec2.keypair.KeyPair` """ params = {} if keynames: self.build_list_params(params, keynames, 'KeyName') if filters: self.build_filter_params(params, filters) return self.get_list('DescribeKeyPairs', params, [('item', KeyPair)], verb='POST') def get_key_pair(self, keyname): """ Convenience method to retrieve a specific keypair (KeyPair). :type image_id: string :param image_id: the ID of the Image to retrieve :rtype: :class:`boto.ec2.keypair.KeyPair` :return: The KeyPair specified or None if it is not found """ try: return self.get_all_key_pairs(keynames=[keyname])[0] except IndexError: # None of those key pairs available return None def create_key_pair(self, key_name): """ Create a new key pair for your account. This will create the key pair within the region you are currently connected to. :type key_name: string :param key_name: The name of the new keypair :rtype: :class:`boto.ec2.keypair.KeyPair` :return: The newly created :class:`boto.ec2.keypair.KeyPair`. The material attribute of the new KeyPair object will contain the the unencrypted PEM encoded RSA private key. """ params = {'KeyName':key_name} return self.get_object('CreateKeyPair', params, KeyPair, verb='POST') def delete_key_pair(self, key_name): """ Delete a key pair from your account. :type key_name: string :param key_name: The name of the keypair to delete """ params = {'KeyName':key_name} return self.get_status('DeleteKeyPair', params, verb='POST') def import_key_pair(self, key_name, public_key_material): """ mports the public key from an RSA key pair that you created with a third-party tool. Supported formats: * OpenSSH public key format (e.g., the format in ~/.ssh/authorized_keys) * Base64 encoded DER format * SSH public key file format as specified in RFC4716 DSA keys are not supported. Make sure your key generator is set up to create RSA keys. Supported lengths: 1024, 2048, and 4096. :type key_name: string :param key_name: The name of the new keypair :type public_key_material: string :param public_key_material: The public key. You must base64 encode the public key material before sending it to AWS. :rtype: :class:`boto.ec2.keypair.KeyPair` :return: The newly created :class:`boto.ec2.keypair.KeyPair`. The material attribute of the new KeyPair object will contain the the unencrypted PEM encoded RSA private key. """ public_key_material = base64.b64encode(public_key_material) params = {'KeyName' : key_name, 'PublicKeyMaterial' : public_key_material} return self.get_object('ImportKeyPair', params, KeyPair, verb='POST') # SecurityGroup methods def get_all_security_groups(self, groupnames=None, group_ids=None, filters=None): """ Get all security groups associated with your account in a region. :type groupnames: list :param groupnames: A list of the names of security groups to retrieve. If not provided, all security groups will be returned. :type group_ids: list :param group_ids: A list of IDs of security groups to retrieve for security groups within a VPC. :type filters: dict :param filters: Optional filters that can be used to limit the results returned. Filters are provided in the form of a dictionary consisting of filter names as the key and filter values as the value. The set of allowable filter names/values is dependent on the request being performed. Check the EC2 API guide for details. :rtype: list :return: A list of :class:`boto.ec2.securitygroup.SecurityGroup` """ params = {} if groupnames is not None: self.build_list_params(params, groupnames, 'GroupName') if group_ids is not None: self.build_list_params(params, group_ids, 'GroupId') if filters is not None: self.build_filter_params(params, filters) return self.get_list('DescribeSecurityGroups', params, [('item', SecurityGroup)], verb='POST') def create_security_group(self, name, description, vpc_id=None): """ Create a new security group for your account. This will create the security group within the region you are currently connected to. :type name: string :param name: The name of the new security group :type description: string :param description: The description of the new security group :type vpc_id: string :param vpc_id: The ID of the VPC to create the security group in, if any. :rtype: :class:`boto.ec2.securitygroup.SecurityGroup` :return: The newly created :class:`boto.ec2.keypair.KeyPair`. """ params = { 'GroupName': name, 'GroupDescription': description } if vpc_id is not None: params['VpcId'] = vpc_id group = self.get_object('CreateSecurityGroup', params, SecurityGroup, verb='POST') group.name = name group.description = description return group def delete_security_group(self, name=None, group_id=None): """ Delete a security group from your account. :type name: string :param name: The name of the security group to delete. :type group_id: string :param group_id: The ID of the security group to delete within a VPC. :rtype: bool :return: True if successful. """ params = {} if name is not None: params['GroupName'] = name elif group_id is not None: params['GroupId'] = group_id return self.get_status('DeleteSecurityGroup', params, verb='POST') def authorize_security_group_deprecated(self, group_name, src_security_group_name=None, src_security_group_owner_id=None, ip_protocol=None, from_port=None, to_port=None, cidr_ip=None): """ NOTE: This method uses the old-style request parameters that did not allow a port to be specified when authorizing a group. :type group_name: string :param group_name: The name of the security group you are adding the rule to. :type src_security_group_name: string :param src_security_group_name: The name of the security group you are granting access to. :type src_security_group_owner_id: string :param src_security_group_owner_id: The ID of the owner of the security group you are granting access to. :type ip_protocol: string :param ip_protocol: Either tcp | udp | icmp :type from_port: int :param from_port: The beginning port number you are enabling :type to_port: int :param to_port: The ending port number you are enabling :type to_port: string :param to_port: The CIDR block you are providing access to. See http://goo.gl/Yj5QC :rtype: bool :return: True if successful. """ params = {'GroupName':group_name} if src_security_group_name: params['SourceSecurityGroupName'] = src_security_group_name if src_security_group_owner_id: params['SourceSecurityGroupOwnerId'] = src_security_group_owner_id if ip_protocol: params['IpProtocol'] = ip_protocol if from_port: params['FromPort'] = from_port if to_port: params['ToPort'] = to_port if cidr_ip: params['CidrIp'] = cidr_ip return self.get_status('AuthorizeSecurityGroupIngress', params) def authorize_security_group(self, group_name=None, src_security_group_name=None, src_security_group_owner_id=None, ip_protocol=None, from_port=None, to_port=None, cidr_ip=None, group_id=None, src_security_group_group_id=None): """ Add a new rule to an existing security group. You need to pass in either src_security_group_name and src_security_group_owner_id OR ip_protocol, from_port, to_port, and cidr_ip. In other words, either you are authorizing another group or you are authorizing some ip-based rule. :type group_name: string :param group_name: The name of the security group you are adding the rule to. :type src_security_group_name: string :param src_security_group_name: The name of the security group you are granting access to. :type src_security_group_owner_id: string :param src_security_group_owner_id: The ID of the owner of the security group you are granting access to. :type ip_protocol: string :param ip_protocol: Either tcp | udp | icmp :type from_port: int :param from_port: The beginning port number you are enabling :type to_port: int :param to_port: The ending port number you are enabling :type cidr_ip: string :param cidr_ip: The CIDR block you are providing access to. See http://goo.gl/Yj5QC :type group_id: string :param group_id: ID of the EC2 or VPC security group to modify. This is required for VPC security groups and can be used instead of group_name for EC2 security groups. :type group_id: string :param group_id: ID of the EC2 or VPC source security group. This is required for VPC security groups and can be used instead of group_name for EC2 security groups. :rtype: bool :return: True if successful. """ if src_security_group_name: if from_port is None and to_port is None and ip_protocol is None: return self.authorize_security_group_deprecated( group_name, src_security_group_name, src_security_group_owner_id) params = {} if group_name: params['GroupName'] = group_name if group_id: params['GroupId'] = group_id if src_security_group_name: param_name = 'IpPermissions.1.Groups.1.GroupName' params[param_name] = src_security_group_name if src_security_group_owner_id: param_name = 'IpPermissions.1.Groups.1.UserId' params[param_name] = src_security_group_owner_id if src_security_group_group_id: param_name = 'IpPermissions.1.Groups.1.GroupId' params[param_name] = src_security_group_group_id if ip_protocol: params['IpPermissions.1.IpProtocol'] = ip_protocol if from_port is not None: params['IpPermissions.1.FromPort'] = from_port if to_port is not None: params['IpPermissions.1.ToPort'] = to_port if cidr_ip: params['IpPermissions.1.IpRanges.1.CidrIp'] = cidr_ip return self.get_status('AuthorizeSecurityGroupIngress', params, verb='POST') def authorize_security_group_egress(group_id, ip_protocol, from_port=None, to_port=None, src_group_id=None, cidr_ip=None): """ The action adds one or more egress rules to a VPC security group. Specifically, this action permits instances in a security group to send traffic to one or more destination CIDR IP address ranges, or to one or more destination security groups in the same VPC. """ params = { 'GroupId': group_id, 'IpPermissions.1.IpProtocol': ip_protocol } if from_port is not None: params['IpPermissions.1.FromPort'] = from_port if to_port is not None: params['IpPermissions.1.ToPort'] = to_port if src_group_id is not None: params['IpPermissions.1.Groups.1.GroupId'] = src_group_id if cidr_ip is not None: params['IpPermissions.1.Groups.1.CidrIp'] = cidr_ip return self.get_status('AuthorizeSecurityGroupEgress', params, verb='POST') def revoke_security_group_deprecated(self, group_name, src_security_group_name=None, src_security_group_owner_id=None, ip_protocol=None, from_port=None, to_port=None, cidr_ip=None): """ NOTE: This method uses the old-style request parameters that did not allow a port to be specified when authorizing a group. Remove an existing rule from an existing security group. You need to pass in either src_security_group_name and src_security_group_owner_id OR ip_protocol, from_port, to_port, and cidr_ip. In other words, either you are revoking another group or you are revoking some ip-based rule. :type group_name: string :param group_name: The name of the security group you are removing the rule from. :type src_security_group_name: string :param src_security_group_name: The name of the security group you are revoking access to. :type src_security_group_owner_id: string :param src_security_group_owner_id: The ID of the owner of the security group you are revoking access to. :type ip_protocol: string :param ip_protocol: Either tcp | udp | icmp :type from_port: int :param from_port: The beginning port number you are disabling :type to_port: int :param to_port: The ending port number you are disabling :type to_port: string :param to_port: The CIDR block you are revoking access to. http://goo.gl/Yj5QC :type group_id: string :param group_id: ID of the EC2 or VPC security group to modify. This is required for VPC security groups and can be used instead of group_name for EC2 security groups. :type group_id: string :param group_id: ID of the EC2 or VPC source security group. This is required for VPC security groups and can be used instead of group_name for EC2 security groups. :rtype: bool :return: True if successful. """ params = {'GroupName':group_name} if src_security_group_name: params['SourceSecurityGroupName'] = src_security_group_name if src_security_group_owner_id: params['SourceSecurityGroupOwnerId'] = src_security_group_owner_id if ip_protocol: params['IpProtocol'] = ip_protocol if from_port: params['FromPort'] = from_port if to_port: params['ToPort'] = to_port if cidr_ip: params['CidrIp'] = cidr_ip return self.get_status('RevokeSecurityGroupIngress', params) def revoke_security_group(self, group_name, src_security_group_name=None, src_security_group_owner_id=None, ip_protocol=None, from_port=None, to_port=None, cidr_ip=None, group_id=None, src_security_group_group_id=None): """ Remove an existing rule from an existing security group. You need to pass in either src_security_group_name and src_security_group_owner_id OR ip_protocol, from_port, to_port, and cidr_ip. In other words, either you are revoking another group or you are revoking some ip-based rule. :type group_name: string :param group_name: The name of the security group you are removing the rule from. :type src_security_group_name: string :param src_security_group_name: The name of the security group you are revoking access to. :type src_security_group_owner_id: string :param src_security_group_owner_id: The ID of the owner of the security group you are revoking access to. :type ip_protocol: string :param ip_protocol: Either tcp | udp | icmp :type from_port: int :param from_port: The beginning port number you are disabling :type to_port: int :param to_port: The ending port number you are disabling :type cidr_ip: string :param cidr_ip: The CIDR block you are revoking access to. See http://goo.gl/Yj5QC :rtype: bool :return: True if successful. """ if src_security_group_name: if from_port is None and to_port is None and ip_protocol is None: return self.revoke_security_group_deprecated( group_name, src_security_group_name, src_security_group_owner_id) params = {} if group_name: params['GroupName'] = group_name if src_security_group_name: param_name = 'IpPermissions.1.Groups.1.GroupName' params[param_name] = src_security_group_name if src_security_group_owner_id: param_name = 'IpPermissions.1.Groups.1.UserId' params[param_name] = src_security_group_owner_id if ip_protocol: params['IpPermissions.1.IpProtocol'] = ip_protocol if from_port is not None: params['IpPermissions.1.FromPort'] = from_port if to_port is not None: params['IpPermissions.1.ToPort'] = to_port if cidr_ip: params['IpPermissions.1.IpRanges.1.CidrIp'] = cidr_ip return self.get_status('RevokeSecurityGroupIngress', params, verb='POST') # # Regions # def get_all_regions(self, region_names=None, filters=None): """ Get all available regions for the EC2 service. :type region_names: list of str :param region_names: Names of regions to limit output :type filters: dict :param filters: Optional filters that can be used to limit the results returned. Filters are provided in the form of a dictionary consisting of filter names as the key and filter values as the value. The set of allowable filter names/values is dependent on the request being performed. Check the EC2 API guide for details. :rtype: list :return: A list of :class:`boto.ec2.regioninfo.RegionInfo` """ params = {} if region_names: self.build_list_params(params, region_names, 'RegionName') if filters: self.build_filter_params(params, filters) regions = self.get_list('DescribeRegions', params, [('item', RegionInfo)], verb='POST') for region in regions: region.connection_cls = EC2Connection return regions # # Reservation methods # def get_all_reserved_instances_offerings(self, reserved_instances_id=None, instance_type=None, availability_zone=None, product_description=None, filters=None): """ Describes Reserved Instance offerings that are available for purchase. :type reserved_instances_id: str :param reserved_instances_id: Displays Reserved Instances with the specified offering IDs. :type instance_type: str :param instance_type: Displays Reserved Instances of the specified instance type. :type availability_zone: str :param availability_zone: Displays Reserved Instances within the specified Availability Zone. :type product_description: str :param product_description: Displays Reserved Instances with the specified product description. :type filters: dict :param filters: Optional filters that can be used to limit the results returned. Filters are provided in the form of a dictionary consisting of filter names as the key and filter values as the value. The set of allowable filter names/values is dependent on the request being performed. Check the EC2 API guide for details. :rtype: list :return: A list of :class:`boto.ec2.reservedinstance.ReservedInstancesOffering` """ params = {} if reserved_instances_id: params['ReservedInstancesId'] = reserved_instances_id if instance_type: params['InstanceType'] = instance_type if availability_zone: params['AvailabilityZone'] = availability_zone if product_description: params['ProductDescription'] = product_description if filters: self.build_filter_params(params, filters) return self.get_list('DescribeReservedInstancesOfferings', params, [('item', ReservedInstancesOffering)], verb='POST') def get_all_reserved_instances(self, reserved_instances_id=None, filters=None): """ Describes Reserved Instance offerings that are available for purchase. :type reserved_instance_ids: list :param reserved_instance_ids: A list of the reserved instance ids that will be returned. If not provided, all reserved instances will be returned. :type filters: dict :param filters: Optional filters that can be used to limit the results returned. Filters are provided in the form of a dictionary consisting of filter names as the key and filter values as the value. The set of allowable filter names/values is dependent on the request being performed. Check the EC2 API guide for details. :rtype: list :return: A list of :class:`boto.ec2.reservedinstance.ReservedInstance` """ params = {} if reserved_instances_id: self.build_list_params(params, reserved_instances_id, 'ReservedInstancesId') if filters: self.build_filter_params(params, filters) return self.get_list('DescribeReservedInstances', params, [('item', ReservedInstance)], verb='POST') def purchase_reserved_instance_offering(self, reserved_instances_offering_id, instance_count=1): """ Purchase a Reserved Instance for use with your account. ** CAUTION ** This request can result in large amounts of money being charged to your AWS account. Use with caution! :type reserved_instances_offering_id: string :param reserved_instances_offering_id: The offering ID of the Reserved Instance to purchase :type instance_count: int :param instance_count: The number of Reserved Instances to purchase. Default value is 1. :rtype: :class:`boto.ec2.reservedinstance.ReservedInstance` :return: The newly created Reserved Instance """ params = { 'ReservedInstancesOfferingId' : reserved_instances_offering_id, 'InstanceCount' : instance_count} return self.get_object('PurchaseReservedInstancesOffering', params, ReservedInstance, verb='POST') # # Monitoring # def monitor_instances(self, instance_ids): """ Enable CloudWatch monitoring for the supplied instances. :type instance_id: list of strings :param instance_id: The instance ids :rtype: list :return: A list of :class:`boto.ec2.instanceinfo.InstanceInfo` """ params = {} self.build_list_params(params, instance_ids, 'InstanceId') return self.get_list('MonitorInstances', params, [('item', InstanceInfo)], verb='POST') def monitor_instance(self, instance_id): """ Deprecated Version, maintained for backward compatibility. Enable CloudWatch monitoring for the supplied instance. :type instance_id: string :param instance_id: The instance id :rtype: list :return: A list of :class:`boto.ec2.instanceinfo.InstanceInfo` """ return self.monitor_instances([instance_id]) def unmonitor_instances(self, instance_ids): """ Disable CloudWatch monitoring for the supplied instance. :type instance_id: list of string :param instance_id: The instance id :rtype: list :return: A list of :class:`boto.ec2.instanceinfo.InstanceInfo` """ params = {} self.build_list_params(params, instance_ids, 'InstanceId') return self.get_list('UnmonitorInstances', params, [('item', InstanceInfo)], verb='POST') def unmonitor_instance(self, instance_id): """ Deprecated Version, maintained for backward compatibility. Disable CloudWatch monitoring for the supplied instance. :type instance_id: string :param instance_id: The instance id :rtype: list :return: A list of :class:`boto.ec2.instanceinfo.InstanceInfo` """ return self.unmonitor_instances([instance_id]) # # Bundle Windows Instances # def bundle_instance(self, instance_id, s3_bucket, s3_prefix, s3_upload_policy): """ Bundle Windows instance. :type instance_id: string :param instance_id: The instance id :type s3_bucket: string :param s3_bucket: The bucket in which the AMI should be stored. :type s3_prefix: string :param s3_prefix: The beginning of the file name for the AMI. :type s3_upload_policy: string :param s3_upload_policy: Base64 encoded policy that specifies condition and permissions for Amazon EC2 to upload the user's image into Amazon S3. """ params = {'InstanceId' : instance_id, 'Storage.S3.Bucket' : s3_bucket, 'Storage.S3.Prefix' : s3_prefix, 'Storage.S3.UploadPolicy' : s3_upload_policy} s3auth = boto.auth.get_auth_handler(None, boto.config, self.provider, ['s3']) params['Storage.S3.AWSAccessKeyId'] = self.aws_access_key_id signature = s3auth.sign_string(s3_upload_policy) params['Storage.S3.UploadPolicySignature'] = signature return self.get_object('BundleInstance', params, BundleInstanceTask, verb='POST') def get_all_bundle_tasks(self, bundle_ids=None, filters=None): """ Retrieve current bundling tasks. If no bundle id is specified, all tasks are retrieved. :type bundle_ids: list :param bundle_ids: A list of strings containing identifiers for previously created bundling tasks. :type filters: dict :param filters: Optional filters that can be used to limit the results returned. Filters are provided in the form of a dictionary consisting of filter names as the key and filter values as the value. The set of allowable filter names/values is dependent on the request being performed. Check the EC2 API guide for details. """ params = {} if bundle_ids: self.build_list_params(params, bundle_ids, 'BundleId') if filters: self.build_filter_params(params, filters) return self.get_list('DescribeBundleTasks', params, [('item', BundleInstanceTask)], verb='POST') def cancel_bundle_task(self, bundle_id): """ Cancel a previously submitted bundle task :type bundle_id: string :param bundle_id: The identifier of the bundle task to cancel. """ params = {'BundleId' : bundle_id} return self.get_object('CancelBundleTask', params, BundleInstanceTask, verb='POST') def get_password_data(self, instance_id): """ Get encrypted administrator password for a Windows instance. :type instance_id: string :param instance_id: The identifier of the instance to retrieve the password for. """ params = {'InstanceId' : instance_id} rs = self.get_object('GetPasswordData', params, ResultSet, verb='POST') return rs.passwordData # # Cluster Placement Groups # def get_all_placement_groups(self, groupnames=None, filters=None): """ Get all placement groups associated with your account in a region. :type groupnames: list :param groupnames: A list of the names of placement groups to retrieve. If not provided, all placement groups will be returned. :type filters: dict :param filters: Optional filters that can be used to limit the results returned. Filters are provided in the form of a dictionary consisting of filter names as the key and filter values as the value. The set of allowable filter names/values is dependent on the request being performed. Check the EC2 API guide for details. :rtype: list :return: A list of :class:`boto.ec2.placementgroup.PlacementGroup` """ params = {} if groupnames: self.build_list_params(params, groupnames, 'GroupName') if filters: self.build_filter_params(params, filters) return self.get_list('DescribePlacementGroups', params, [('item', PlacementGroup)], verb='POST') def create_placement_group(self, name, strategy='cluster'): """ Create a new placement group for your account. This will create the placement group within the region you are currently connected to. :type name: string :param name: The name of the new placement group :type strategy: string :param strategy: The placement strategy of the new placement group. Currently, the only acceptable value is "cluster". :rtype: bool :return: True if successful """ params = {'GroupName':name, 'Strategy':strategy} group = self.get_status('CreatePlacementGroup', params, verb='POST') return group def delete_placement_group(self, name): """ Delete a placement group from your account. :type key_name: string :param key_name: The name of the keypair to delete """ params = {'GroupName':name} return self.get_status('DeletePlacementGroup', params, verb='POST') # Tag methods def build_tag_param_list(self, params, tags): keys = tags.keys() keys.sort() i = 1 for key in keys: value = tags[key] params['Tag.%d.Key'%i] = key if value is not None: params['Tag.%d.Value'%i] = value i += 1 def get_all_tags(self, filters=None): """ Retrieve all the metadata tags associated with your account. :type filters: dict :param filters: Optional filters that can be used to limit the results returned. Filters are provided in the form of a dictionary consisting of filter names as the key and filter values as the value. The set of allowable filter names/values is dependent on the request being performed. Check the EC2 API guide for details. :rtype: dict :return: A dictionary containing metadata tags """ params = {} if filters: self.build_filter_params(params, filters) return self.get_list('DescribeTags', params, [('item', Tag)], verb='POST') def create_tags(self, resource_ids, tags): """ Create new metadata tags for the specified resource ids. :type resource_ids: list :param resource_ids: List of strings :type tags: dict :param tags: A dictionary containing the name/value pairs. If you want to create only a tag name, the value for that tag should be the empty string (e.g. ''). """ params = {} self.build_list_params(params, resource_ids, 'ResourceId') self.build_tag_param_list(params, tags) return self.get_status('CreateTags', params, verb='POST') def delete_tags(self, resource_ids, tags): """ Delete metadata tags for the specified resource ids. :type resource_ids: list :param resource_ids: List of strings :type tags: dict or list :param tags: Either a dictionary containing name/value pairs or a list containing just tag names. If you pass in a dictionary, the values must match the actual tag values or the tag will not be deleted. If you pass in a value of None for the tag value, all tags with that name will be deleted. """ if isinstance(tags, list): tags = {}.fromkeys(tags, None) params = {} self.build_list_params(params, resource_ids, 'ResourceId') self.build_tag_param_list(params, tags) return self.get_status('DeleteTags', params, verb='POST') ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/ec2object.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an EC2 Object """ from boto.ec2.tag import TagSet class EC2Object(object): def __init__(self, connection=None): self.connection = connection if self.connection and hasattr(self.connection, 'region'): self.region = connection.region else: self.region = None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): setattr(self, name, value) class TaggedEC2Object(EC2Object): """ Any EC2 resource that can be tagged should be represented by a Python object that subclasses this class. This class has the mechanism in place to handle the tagSet element in the Describe* responses. If tags are found, it will create a TagSet object and allow it to parse and collect the tags into a dict that is stored in the "tags" attribute of the object. """ def __init__(self, connection=None): EC2Object.__init__(self, connection) self.tags = TagSet() def startElement(self, name, attrs, connection): if name == 'tagSet': return self.tags else: return None def add_tag(self, key, value=''): """ Add a tag to this object. Tag's are stored by AWS and can be used to organize and filter resources. Adding a tag involves a round-trip to the EC2 service. :type key: str :param key: The key or name of the tag being stored. :type value: str :param value: An optional value that can be stored with the tag. If you want only the tag name and no value, the value should be the empty string. """ status = self.connection.create_tags([self.id], {key : value}) if self.tags is None: self.tags = TagSet() self.tags[key] = value def remove_tag(self, key, value=None): """ Remove a tag from this object. Removing a tag involves a round-trip to the EC2 service. :type key: str :param key: The key or name of the tag being stored. :type value: str :param value: An optional value that can be stored with the tag. If a value is provided, it must match the value currently stored in EC2. If not, the tag will not be removed. If a value of None is provided, all tags with the specified name will be deleted. NOTE: There is an important distinction between a value of '' and a value of None. """ if value: tags = {key : value} else: tags = [key] status = self.connection.delete_tags([self.id], tags) if key in self.tags: del self.tags[key] ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/elb/__init__.py ================================================ # Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # """ This module provides an interface to the Elastic Compute Cloud (EC2) load balancing service from AWS. """ from boto.connection import AWSQueryConnection from boto.ec2.instanceinfo import InstanceInfo from boto.ec2.elb.loadbalancer import LoadBalancer from boto.ec2.elb.instancestate import InstanceState from boto.ec2.elb.healthcheck import HealthCheck from boto.regioninfo import RegionInfo import boto RegionData = { 'us-east-1' : 'elasticloadbalancing.us-east-1.amazonaws.com', 'us-west-1' : 'elasticloadbalancing.us-west-1.amazonaws.com', 'eu-west-1' : 'elasticloadbalancing.eu-west-1.amazonaws.com', 'ap-northeast-1' : 'elasticloadbalancing.ap-northeast-1.amazonaws.com', 'ap-southeast-1' : 'elasticloadbalancing.ap-southeast-1.amazonaws.com'} def regions(): """ Get all available regions for the SDB service. :rtype: list :return: A list of :class:`boto.RegionInfo` instances """ regions = [] for region_name in RegionData: region = RegionInfo(name=region_name, endpoint=RegionData[region_name], connection_cls=ELBConnection) regions.append(region) return regions def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.ec2.elb.ELBConnection`. :param str region_name: The name of the region to connect to. :rtype: :class:`boto.ec2.ELBConnection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ for region in regions(): if region.name == region_name: return region.connect(**kw_params) return None class ELBConnection(AWSQueryConnection): APIVersion = boto.config.get('Boto', 'elb_version', '2011-04-05') DefaultRegionName = boto.config.get('Boto', 'elb_region_name', 'us-east-1') DefaultRegionEndpoint = boto.config.get('Boto', 'elb_region_endpoint', 'elasticloadbalancing.amazonaws.com') def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=False, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, region=None, path='/'): """ Init method to create a new connection to EC2 Load Balancing Service. B{Note:} The region argument is overridden by the region specified in the boto configuration file. """ if not region: region = RegionInfo(self, self.DefaultRegionName, self.DefaultRegionEndpoint) self.region = region AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, self.region.endpoint, debug, https_connection_factory, path) def _required_auth_capability(self): return ['ec2'] def build_list_params(self, params, items, label): if isinstance(items, str): items = [items] for index, item in enumerate(items): params[label % (index + 1)] = item def get_all_load_balancers(self, load_balancer_names=None): """ Retrieve all load balancers associated with your account. :type load_balancer_names: list :param load_balancer_names: An optional list of load balancer names :rtype: list :return: A list of :class:`boto.ec2.elb.loadbalancer.LoadBalancer` """ params = {} if load_balancer_names: self.build_list_params(params, load_balancer_names, 'LoadBalancerNames.member.%d') return self.get_list('DescribeLoadBalancers', params, [('member', LoadBalancer)]) def create_load_balancer(self, name, zones, listeners): """ Create a new load balancer for your account. :type name: string :param name: The mnemonic name associated with the new load balancer :type zones: List of strings :param zones: The names of the availability zone(s) to add. :type listeners: List of tuples :param listeners: Each tuple contains three or four values, (LoadBalancerPortNumber, InstancePortNumber, Protocol, [SSLCertificateId]) where LoadBalancerPortNumber and InstancePortNumber are integer values between 1 and 65535, Protocol is a string containing either 'TCP', 'HTTP' or 'HTTPS'; SSLCertificateID is the ARN of a AWS AIM certificate, and must be specified when doing HTTPS. :rtype: :class:`boto.ec2.elb.loadbalancer.LoadBalancer` :return: The newly created :class:`boto.ec2.elb.loadbalancer.LoadBalancer` """ params = {'LoadBalancerName' : name} for index, listener in enumerate(listeners): i = index + 1 params['Listeners.member.%d.LoadBalancerPort' % i] = listener[0] params['Listeners.member.%d.InstancePort' % i] = listener[1] params['Listeners.member.%d.Protocol' % i] = listener[2] if listener[2]=='HTTPS': params['Listeners.member.%d.SSLCertificateId' % i] = listener[3] self.build_list_params(params, zones, 'AvailabilityZones.member.%d') load_balancer = self.get_object('CreateLoadBalancer', params, LoadBalancer) load_balancer.name = name load_balancer.listeners = listeners load_balancer.availability_zones = zones return load_balancer def create_load_balancer_listeners(self, name, listeners): """ Creates a Listener (or group of listeners) for an existing Load Balancer :type name: string :param name: The name of the load balancer to create the listeners for :type listeners: List of tuples :param listeners: Each tuple contains three values, (LoadBalancerPortNumber, InstancePortNumber, Protocol, [SSLCertificateId]) where LoadBalancerPortNumber and InstancePortNumber are integer values between 1 and 65535, Protocol is a string containing either 'TCP', 'HTTP' or 'HTTPS'; SSLCertificateID is the ARN of a AWS AIM certificate, and must be specified when doing HTTPS. :return: The status of the request """ params = {'LoadBalancerName' : name} for index, listener in enumerate(listeners): i = index + 1 params['Listeners.member.%d.LoadBalancerPort' % i] = listener[0] params['Listeners.member.%d.InstancePort' % i] = listener[1] params['Listeners.member.%d.Protocol' % i] = listener[2] if listener[2]=='HTTPS': params['Listeners.member.%d.SSLCertificateId' % i] = listener[3] return self.get_status('CreateLoadBalancerListeners', params) def delete_load_balancer(self, name): """ Delete a Load Balancer from your account. :type name: string :param name: The name of the Load Balancer to delete """ params = {'LoadBalancerName': name} return self.get_status('DeleteLoadBalancer', params) def delete_load_balancer_listeners(self, name, ports): """ Deletes a load balancer listener (or group of listeners) :type name: string :param name: The name of the load balancer to create the listeners for :type ports: List int :param ports: Each int represents the port on the ELB to be removed :return: The status of the request """ params = {'LoadBalancerName' : name} for index, port in enumerate(ports): params['LoadBalancerPorts.member.%d' % (index + 1)] = port return self.get_status('DeleteLoadBalancerListeners', params) def enable_availability_zones(self, load_balancer_name, zones_to_add): """ Add availability zones to an existing Load Balancer All zones must be in the same region as the Load Balancer Adding zones that are already registered with the Load Balancer has no effect. :type load_balancer_name: string :param load_balancer_name: The name of the Load Balancer :type zones: List of strings :param zones: The name of the zone(s) to add. :rtype: List of strings :return: An updated list of zones for this Load Balancer. """ params = {'LoadBalancerName' : load_balancer_name} self.build_list_params(params, zones_to_add, 'AvailabilityZones.member.%d') return self.get_list('EnableAvailabilityZonesForLoadBalancer', params, None) def disable_availability_zones(self, load_balancer_name, zones_to_remove): """ Remove availability zones from an existing Load Balancer. All zones must be in the same region as the Load Balancer. Removing zones that are not registered with the Load Balancer has no effect. You cannot remove all zones from an Load Balancer. :type load_balancer_name: string :param load_balancer_name: The name of the Load Balancer :type zones: List of strings :param zones: The name of the zone(s) to remove. :rtype: List of strings :return: An updated list of zones for this Load Balancer. """ params = {'LoadBalancerName' : load_balancer_name} self.build_list_params(params, zones_to_remove, 'AvailabilityZones.member.%d') return self.get_list('DisableAvailabilityZonesForLoadBalancer', params, None) def register_instances(self, load_balancer_name, instances): """ Add new Instances to an existing Load Balancer. :type load_balancer_name: string :param load_balancer_name: The name of the Load Balancer :type instances: List of strings :param instances: The instance ID's of the EC2 instances to add. :rtype: List of strings :return: An updated list of instances for this Load Balancer. """ params = {'LoadBalancerName' : load_balancer_name} self.build_list_params(params, instances, 'Instances.member.%d.InstanceId') return self.get_list('RegisterInstancesWithLoadBalancer', params, [('member', InstanceInfo)]) def deregister_instances(self, load_balancer_name, instances): """ Remove Instances from an existing Load Balancer. :type load_balancer_name: string :param load_balancer_name: The name of the Load Balancer :type instances: List of strings :param instances: The instance ID's of the EC2 instances to remove. :rtype: List of strings :return: An updated list of instances for this Load Balancer. """ params = {'LoadBalancerName' : load_balancer_name} self.build_list_params(params, instances, 'Instances.member.%d.InstanceId') return self.get_list('DeregisterInstancesFromLoadBalancer', params, [('member', InstanceInfo)]) def describe_instance_health(self, load_balancer_name, instances=None): """ Get current state of all Instances registered to an Load Balancer. :type load_balancer_name: string :param load_balancer_name: The name of the Load Balancer :type instances: List of strings :param instances: The instance ID's of the EC2 instances to return status for. If not provided, the state of all instances will be returned. :rtype: List of :class:`boto.ec2.elb.instancestate.InstanceState` :return: list of state info for instances in this Load Balancer. """ params = {'LoadBalancerName' : load_balancer_name} if instances: self.build_list_params(params, instances, 'Instances.member.%d.InstanceId') return self.get_list('DescribeInstanceHealth', params, [('member', InstanceState)]) def configure_health_check(self, name, health_check): """ Define a health check for the EndPoints. :type name: string :param name: The mnemonic name associated with the load balancer :type health_check: :class:`boto.ec2.elb.healthcheck.HealthCheck` :param health_check: A HealthCheck object populated with the desired values. :rtype: :class:`boto.ec2.elb.healthcheck.HealthCheck` :return: The updated :class:`boto.ec2.elb.healthcheck.HealthCheck` """ params = {'LoadBalancerName' : name, 'HealthCheck.Timeout' : health_check.timeout, 'HealthCheck.Target' : health_check.target, 'HealthCheck.Interval' : health_check.interval, 'HealthCheck.UnhealthyThreshold' : health_check.unhealthy_threshold, 'HealthCheck.HealthyThreshold' : health_check.healthy_threshold} return self.get_object('ConfigureHealthCheck', params, HealthCheck) def set_lb_listener_SSL_certificate(self, lb_name, lb_port, ssl_certificate_id): """ Sets the certificate that terminates the specified listener's SSL connections. The specified certificate replaces any prior certificate that was used on the same LoadBalancer and port. """ params = { 'LoadBalancerName' : lb_name, 'LoadBalancerPort' : lb_port, 'SSLCertificateId' : ssl_certificate_id, } return self.get_status('SetLoadBalancerListenerSSLCertificate', params) def create_app_cookie_stickiness_policy(self, name, lb_name, policy_name): """ Generates a stickiness policy with sticky session lifetimes that follow that of an application-generated cookie. This policy can only be associated with HTTP listeners. This policy is similar to the policy created by CreateLBCookieStickinessPolicy, except that the lifetime of the special Elastic Load Balancing cookie follows the lifetime of the application-generated cookie specified in the policy configuration. The load balancer only inserts a new stickiness cookie when the application response includes a new application cookie. If the application cookie is explicitly removed or expires, the session stops being sticky until a new application cookie is issued. """ params = { 'CookieName' : name, 'LoadBalancerName' : lb_name, 'PolicyName' : policy_name, } return self.get_status('CreateAppCookieStickinessPolicy', params) def create_lb_cookie_stickiness_policy(self, cookie_expiration_period, lb_name, policy_name): """ Generates a stickiness policy with sticky session lifetimes controlled by the lifetime of the browser (user-agent) or a specified expiration period. This policy can only be associated only with HTTP listeners. When a load balancer implements this policy, the load balancer uses a special cookie to track the backend server instance for each request. When the load balancer receives a request, it first checks to see if this cookie is present in the request. If so, the load balancer sends the request to the application server specified in the cookie. If not, the load balancer sends the request to a server that is chosen based on the existing load balancing algorithm. A cookie is inserted into the response for binding subsequent requests from the same user to that server. The validity of the cookie is based on the cookie expiration time, which is specified in the policy configuration. """ params = { 'CookieExpirationPeriod' : cookie_expiration_period, 'LoadBalancerName' : lb_name, 'PolicyName' : policy_name, } return self.get_status('CreateLBCookieStickinessPolicy', params) def delete_lb_policy(self, lb_name, policy_name): """ Deletes a policy from the LoadBalancer. The specified policy must not be enabled for any listeners. """ params = { 'LoadBalancerName' : lb_name, 'PolicyName' : policy_name, } return self.get_status('DeleteLoadBalancerPolicy', params) def set_lb_policies_of_listener(self, lb_name, lb_port, policies): """ Associates, updates, or disables a policy with a listener on the load balancer. Currently only zero (0) or one (1) policy can be associated with a listener. """ params = { 'LoadBalancerName' : lb_name, 'LoadBalancerPort' : lb_port, } self.build_list_params(params, policies, 'PolicyNames.member.%d') return self.get_status('SetLoadBalancerPoliciesOfListener', params) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/elb/healthcheck.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class HealthCheck(object): """ Represents an EC2 Access Point Health Check """ def __init__(self, access_point=None, interval=30, target=None, healthy_threshold=3, timeout=5, unhealthy_threshold=5): self.access_point = access_point self.interval = interval self.target = target self.healthy_threshold = healthy_threshold self.timeout = timeout self.unhealthy_threshold = unhealthy_threshold def __repr__(self): return 'HealthCheck:%s' % self.target def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'Interval': self.interval = int(value) elif name == 'Target': self.target = value elif name == 'HealthyThreshold': self.healthy_threshold = int(value) elif name == 'Timeout': self.timeout = int(value) elif name == 'UnhealthyThreshold': self.unhealthy_threshold = int(value) else: setattr(self, name, value) def update(self): if not self.access_point: return new_hc = self.connection.configure_health_check(self.access_point, self) self.interval = new_hc.interval self.target = new_hc.target self.healthy_threshold = new_hc.healthy_threshold self.unhealthy_threshold = new_hc.unhealthy_threshold self.timeout = new_hc.timeout ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/elb/instancestate.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class InstanceState(object): """ Represents the state of an EC2 Load Balancer Instance """ def __init__(self, load_balancer=None, description=None, state=None, instance_id=None, reason_code=None): self.load_balancer = load_balancer self.description = description self.state = state self.instance_id = instance_id self.reason_code = reason_code def __repr__(self): return 'InstanceState:(%s,%s)' % (self.instance_id, self.state) def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'Description': self.description = value elif name == 'State': self.state = value elif name == 'InstanceId': self.instance_id = value elif name == 'ReasonCode': self.reason_code = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/elb/listelement.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class ListElement(list): def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'member': self.append(value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/elb/listener.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class Listener(object): """ Represents an EC2 Load Balancer Listener tuple """ def __init__(self, load_balancer=None, load_balancer_port=0, instance_port=0, protocol='', ssl_certificate_id=None): self.load_balancer = load_balancer self.load_balancer_port = load_balancer_port self.instance_port = instance_port self.protocol = protocol self.ssl_certificate_id = ssl_certificate_id def __repr__(self): r = "(%d, %d, '%s'" % (self.load_balancer_port, self.instance_port, self.protocol) if self.ssl_certificate_id: r += ', %s' % (self.ssl_certificate_id) r += ')' return r def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'LoadBalancerPort': self.load_balancer_port = int(value) elif name == 'InstancePort': self.instance_port = int(value) elif name == 'Protocol': self.protocol = value elif name == 'SSLCertificateId': self.ssl_certificate_id = value else: setattr(self, name, value) def get_tuple(self): return self.load_balancer_port, self.instance_port, self.protocol def __getitem__(self, key): if key == 0: return self.load_balancer_port if key == 1: return self.instance_port if key == 2: return self.protocol raise KeyError ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/elb/loadbalancer.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.ec2.elb.healthcheck import HealthCheck from boto.ec2.elb.listener import Listener from boto.ec2.elb.listelement import ListElement from boto.ec2.elb.policies import Policies from boto.ec2.elb.securitygroup import SecurityGroup from boto.ec2.instanceinfo import InstanceInfo from boto.resultset import ResultSet class LoadBalancer(object): """ Represents an EC2 Load Balancer """ def __init__(self, connection=None, name=None, endpoints=None): self.connection = connection self.name = name self.listeners = None self.health_check = None self.policies = None self.dns_name = None self.created_time = None self.instances = None self.availability_zones = ListElement() self.canonical_hosted_zone_name = None self.canonical_hosted_zone_name_id = None self.source_security_group = None def __repr__(self): return 'LoadBalancer:%s' % self.name def startElement(self, name, attrs, connection): if name == 'HealthCheck': self.health_check = HealthCheck(self) return self.health_check elif name == 'ListenerDescriptions': self.listeners = ResultSet([('member', Listener)]) return self.listeners elif name == 'AvailabilityZones': return self.availability_zones elif name == 'Instances': self.instances = ResultSet([('member', InstanceInfo)]) return self.instances elif name == 'Policies': self.policies = Policies(self) return self.policies elif name == 'SourceSecurityGroup': self.source_security_group = SecurityGroup() return self.source_security_group else: return None def endElement(self, name, value, connection): if name == 'LoadBalancerName': self.name = value elif name == 'DNSName': self.dns_name = value elif name == 'CreatedTime': self.created_time = value elif name == 'InstanceId': self.instances.append(value) elif name == 'CanonicalHostedZoneName': self.canonical_hosted_zone_name = value elif name == 'CanonicalHostedZoneNameID': self.canonical_hosted_zone_name_id = value else: setattr(self, name, value) def enable_zones(self, zones): """ Enable availability zones to this Access Point. All zones must be in the same region as the Access Point. :type zones: string or List of strings :param zones: The name of the zone(s) to add. """ if isinstance(zones, str) or isinstance(zones, unicode): zones = [zones] new_zones = self.connection.enable_availability_zones(self.name, zones) self.availability_zones = new_zones def disable_zones(self, zones): """ Disable availability zones from this Access Point. :type zones: string or List of strings :param zones: The name of the zone(s) to add. """ if isinstance(zones, str) or isinstance(zones, unicode): zones = [zones] new_zones = self.connection.disable_availability_zones(self.name, zones) self.availability_zones = new_zones def register_instances(self, instances): """ Add instances to this Load Balancer All instances must be in the same region as the Load Balancer. Adding endpoints that are already registered with the Load Balancer has no effect. :type zones: string or List of instance id's :param zones: The name of the endpoint(s) to add. """ if isinstance(instances, str) or isinstance(instances, unicode): instances = [instances] new_instances = self.connection.register_instances(self.name, instances) self.instances = new_instances def deregister_instances(self, instances): """ Remove instances from this Load Balancer. Removing instances that are not registered with the Load Balancer has no effect. :type zones: string or List of instance id's :param zones: The name of the endpoint(s) to add. """ if isinstance(instances, str) or isinstance(instances, unicode): instances = [instances] new_instances = self.connection.deregister_instances(self.name, instances) self.instances = new_instances def delete(self): """ Delete this load balancer """ return self.connection.delete_load_balancer(self.name) def configure_health_check(self, health_check): return self.connection.configure_health_check(self.name, health_check) def get_instance_health(self, instances=None): return self.connection.describe_instance_health(self.name, instances) def create_listeners(self, listeners): return self.connection.create_load_balancer_listeners(self.name, listeners) def create_listener(self, inPort, outPort=None, proto="tcp"): if outPort == None: outPort = inPort return self.create_listeners([(inPort, outPort, proto)]) def delete_listeners(self, listeners): return self.connection.delete_load_balancer_listeners(self.name, listeners) def delete_listener(self, inPort, outPort=None, proto="tcp"): if outPort == None: outPort = inPort return self.delete_listeners([(inPort, outPort, proto)]) def delete_policy(self, policy_name): """ Deletes a policy from the LoadBalancer. The specified policy must not be enabled for any listeners. """ return self.connection.delete_lb_policy(self.name, policy_name) def set_policies_of_listener(self, lb_port, policies): return self.connection.set_lb_policies_of_listener(self.name, lb_port, policies) def create_cookie_stickiness_policy(self, cookie_expiration_period, policy_name): return self.connection.create_lb_cookie_stickiness_policy(cookie_expiration_period, self.name, policy_name) def create_app_cookie_stickiness_policy(self, name, policy_name): return self.connection.create_app_cookie_stickiness_policy(name, self.name, policy_name) def set_listener_SSL_certificate(self, lb_port, ssl_certificate_id): return self.connection.set_lb_listener_SSL_certificate(self.name, lb_port, ssl_certificate_id) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/elb/policies.py ================================================ # Copyright (c) 2010 Reza Lotun http://reza.lotun.name # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.resultset import ResultSet class AppCookieStickinessPolicy(object): def __init__(self, connection=None): self.cookie_name = None self.policy_name = None def __repr__(self): return 'AppCookieStickiness(%s, %s)' % (self.policy_name, self.cookie_name) def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'CookieName': self.cookie_name = value elif name == 'PolicyName': self.policy_name = value class LBCookieStickinessPolicy(object): def __init__(self, connection=None): self.policy_name = None self.cookie_expiration_period = None def __repr__(self): return 'LBCookieStickiness(%s, %s)' % (self.policy_name, self.cookie_expiration_period) def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'CookieExpirationPeriod': self.cookie_expiration_period = value elif name == 'PolicyName': self.policy_name = value class Policies(object): """ ELB Policies """ def __init__(self, connection=None): self.connection = connection self.app_cookie_stickiness_policies = None self.lb_cookie_stickiness_policies = None def __repr__(self): app = 'AppCookieStickiness%s' % self.app_cookie_stickiness_policies lb = 'LBCookieStickiness%s' % self.lb_cookie_stickiness_policies return 'Policies(%s,%s)' % (app, lb) def startElement(self, name, attrs, connection): if name == 'AppCookieStickinessPolicies': rs = ResultSet([('member', AppCookieStickinessPolicy)]) self.app_cookie_stickiness_policies = rs elif name == 'LBCookieStickinessPolicies': rs = ResultSet([('member', LBCookieStickinessPolicy)]) self.lb_cookie_stickiness_policies = rs def endElement(self, name, value, connection): return ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/elb/securitygroup.py ================================================ # Copyright (c) 2010 Reza Lotun http://reza.lotun.name # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class SecurityGroup(object): def __init__(self, connection=None): self.name = None self.owner_alias = None def __repr__(self): return 'SecurityGroup(%s, %s)' % (self.name, self.owner_alias) def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'GroupName': self.name = value elif name == 'OwnerAlias': self.owner_alias = value ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/image.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.ec2.ec2object import EC2Object, TaggedEC2Object from boto.ec2.blockdevicemapping import BlockDeviceMapping class ProductCodes(list): def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'productCode': self.append(value) class Image(TaggedEC2Object): """ Represents an EC2 Image """ def __init__(self, connection=None): TaggedEC2Object.__init__(self, connection) self.id = None self.location = None self.state = None self.ownerId = None # for backwards compatibility self.owner_id = None self.owner_alias = None self.is_public = False self.architecture = None self.platform = None self.type = None self.kernel_id = None self.ramdisk_id = None self.name = None self.description = None self.product_codes = ProductCodes() self.block_device_mapping = None self.root_device_type = None self.root_device_name = None self.virtualization_type = None self.hypervisor = None self.instance_lifecycle = None def __repr__(self): return 'Image:%s' % self.id def startElement(self, name, attrs, connection): retval = TaggedEC2Object.startElement(self, name, attrs, connection) if retval is not None: return retval if name == 'blockDeviceMapping': self.block_device_mapping = BlockDeviceMapping() return self.block_device_mapping elif name == 'productCodes': return self.product_codes else: return None def endElement(self, name, value, connection): if name == 'imageId': self.id = value elif name == 'imageLocation': self.location = value elif name == 'imageState': self.state = value elif name == 'imageOwnerId': self.ownerId = value # for backwards compatibility self.owner_id = value elif name == 'isPublic': if value == 'false': self.is_public = False elif value == 'true': self.is_public = True else: raise Exception( 'Unexpected value of isPublic %s for image %s'%( value, self.id ) ) elif name == 'architecture': self.architecture = value elif name == 'imageType': self.type = value elif name == 'kernelId': self.kernel_id = value elif name == 'ramdiskId': self.ramdisk_id = value elif name == 'imageOwnerAlias': self.owner_alias = value elif name == 'platform': self.platform = value elif name == 'name': self.name = value elif name == 'description': self.description = value elif name == 'rootDeviceType': self.root_device_type = value elif name == 'rootDeviceName': self.root_device_name = value elif name == 'virtualizationType': self.virtualization_type = value elif name == 'hypervisor': self.hypervisor = value elif name == 'instanceLifecycle': self.instance_lifecycle = value else: setattr(self, name, value) def _update(self, updated): self.__dict__.update(updated.__dict__) def update(self, validate=False): """ Update the image's state information by making a call to fetch the current image attributes from the service. :type validate: bool :param validate: By default, if EC2 returns no data about the image the update method returns quietly. If the validate param is True, however, it will raise a ValueError exception if no data is returned from EC2. """ rs = self.connection.get_all_images([self.id]) if len(rs) > 0: img = rs[0] if img.id == self.id: self._update(img) elif validate: raise ValueError('%s is not a valid Image ID' % self.id) return self.state def run(self, min_count=1, max_count=1, key_name=None, security_groups=None, user_data=None, addressing_type=None, instance_type='m1.small', placement=None, kernel_id=None, ramdisk_id=None, monitoring_enabled=False, subnet_id=None, block_device_map=None, disable_api_termination=False, instance_initiated_shutdown_behavior=None, private_ip_address=None, placement_group=None, security_group_ids=None): """ Runs this instance. :type min_count: int :param min_count: The minimum number of instances to start :type max_count: int :param max_count: The maximum number of instances to start :type key_name: string :param key_name: The name of the keypair to run this instance with. :type security_groups: :param security_groups: :type user_data: :param user_data: :type addressing_type: :param daddressing_type: :type instance_type: string :param instance_type: The type of instance to run. Current choices are: m1.small | m1.large | m1.xlarge | c1.medium | c1.xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge | cc1.4xlarge :type placement: string :param placement: The availability zone in which to launch the instances :type kernel_id: string :param kernel_id: The ID of the kernel with which to launch the instances :type ramdisk_id: string :param ramdisk_id: The ID of the RAM disk with which to launch the instances :type monitoring_enabled: bool :param monitoring_enabled: Enable CloudWatch monitoring on the instance. :type subnet_id: string :param subnet_id: The subnet ID within which to launch the instances for VPC. :type private_ip_address: string :param private_ip_address: If you're using VPC, you can optionally use this parameter to assign the instance a specific available IP address from the subnet (e.g., 10.0.0.25). :type block_device_map: :class:`boto.ec2.blockdevicemapping.BlockDeviceMapping` :param block_device_map: A BlockDeviceMapping data structure describing the EBS volumes associated with the Image. :type disable_api_termination: bool :param disable_api_termination: If True, the instances will be locked and will not be able to be terminated via the API. :type instance_initiated_shutdown_behavior: string :param instance_initiated_shutdown_behavior: Specifies whether the instance stops or terminates on instance-initiated shutdown. Valid values are: stop | terminate :type placement_group: string :param placement_group: If specified, this is the name of the placement group in which the instance(s) will be launched. :rtype: Reservation :return: The :class:`boto.ec2.instance.Reservation` associated with the request for machines :type security_group_ids: :param security_group_ids: """ return self.connection.run_instances(self.id, min_count, max_count, key_name, security_groups, user_data, addressing_type, instance_type, placement, kernel_id, ramdisk_id, monitoring_enabled, subnet_id, block_device_map, disable_api_termination, instance_initiated_shutdown_behavior, private_ip_address, placement_group, security_group_ids=security_group_ids) def deregister(self, delete_snapshot=False): return self.connection.deregister_image(self.id, delete_snapshot) def get_launch_permissions(self): img_attrs = self.connection.get_image_attribute(self.id, 'launchPermission') return img_attrs.attrs def set_launch_permissions(self, user_ids=None, group_names=None): return self.connection.modify_image_attribute(self.id, 'launchPermission', 'add', user_ids, group_names) def remove_launch_permissions(self, user_ids=None, group_names=None): return self.connection.modify_image_attribute(self.id, 'launchPermission', 'remove', user_ids, group_names) def reset_launch_attributes(self): return self.connection.reset_image_attribute(self.id, 'launchPermission') def get_kernel(self): img_attrs =self.connection.get_image_attribute(self.id, 'kernel') return img_attrs.kernel def get_ramdisk(self): img_attrs = self.connection.get_image_attribute(self.id, 'ramdisk') return img_attrs.ramdisk class ImageAttribute: def __init__(self, parent=None): self.name = None self.kernel = None self.ramdisk = None self.attrs = {} def startElement(self, name, attrs, connection): if name == 'blockDeviceMapping': self.attrs['block_device_mapping'] = BlockDeviceMapping() return self.attrs['block_device_mapping'] else: return None def endElement(self, name, value, connection): if name == 'launchPermission': self.name = 'launch_permission' elif name == 'group': if self.attrs.has_key('groups'): self.attrs['groups'].append(value) else: self.attrs['groups'] = [value] elif name == 'userId': if self.attrs.has_key('user_ids'): self.attrs['user_ids'].append(value) else: self.attrs['user_ids'] = [value] elif name == 'productCode': if self.attrs.has_key('product_codes'): self.attrs['product_codes'].append(value) else: self.attrs['product_codes'] = [value] elif name == 'imageId': self.image_id = value elif name == 'kernel': self.kernel = value elif name == 'ramdisk': self.ramdisk = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/instance.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an EC2 Instance """ import boto from boto.ec2.ec2object import EC2Object, TaggedEC2Object from boto.resultset import ResultSet from boto.ec2.address import Address from boto.ec2.blockdevicemapping import BlockDeviceMapping from boto.ec2.image import ProductCodes import base64 class Reservation(EC2Object): """ Represents a Reservation response object. :ivar id: The unique ID of the Reservation. :ivar owner_id: The unique ID of the owner of the Reservation. :ivar groups: A list of Group objects representing the security groups associated with launched instances. :ivar instances: A list of Instance objects launched in this Reservation. """ def __init__(self, connection=None): EC2Object.__init__(self, connection) self.id = None self.owner_id = None self.groups = [] self.instances = [] def __repr__(self): return 'Reservation:%s' % self.id def startElement(self, name, attrs, connection): if name == 'instancesSet': self.instances = ResultSet([('item', Instance)]) return self.instances elif name == 'groupSet': self.groups = ResultSet([('item', Group)]) return self.groups else: return None def endElement(self, name, value, connection): if name == 'reservationId': self.id = value elif name == 'ownerId': self.owner_id = value else: setattr(self, name, value) def stop_all(self): for instance in self.instances: instance.stop() class Instance(TaggedEC2Object): def __init__(self, connection=None): TaggedEC2Object.__init__(self, connection) self.id = None self.dns_name = None self.public_dns_name = None self.private_dns_name = None self.state = None self.state_code = None self.key_name = None self.shutdown_state = None self.previous_state = None self.instance_type = None self.instance_class = None self.launch_time = None self.image_id = None self.placement = None self.kernel = None self.ramdisk = None self.product_codes = ProductCodes() self.ami_launch_index = None self.monitored = False self.instance_class = None self.spot_instance_request_id = None self.subnet_id = None self.vpc_id = None self.private_ip_address = None self.ip_address = None self.requester_id = None self._in_monitoring_element = False self.persistent = False self.root_device_name = None self.root_device_type = None self.block_device_mapping = None self.state_reason = None self.group_name = None self.client_token = None self.groups = [] def __repr__(self): return 'Instance:%s' % self.id def startElement(self, name, attrs, connection): retval = TaggedEC2Object.startElement(self, name, attrs, connection) if retval is not None: return retval if name == 'monitoring': self._in_monitoring_element = True elif name == 'blockDeviceMapping': self.block_device_mapping = BlockDeviceMapping() return self.block_device_mapping elif name == 'productCodes': return self.product_codes elif name == 'stateReason': self.state_reason = StateReason() return self.state_reason elif name == 'groupSet': self.groups = ResultSet([('item', Group)]) return self.groups return None def endElement(self, name, value, connection): if name == 'instanceId': self.id = value elif name == 'imageId': self.image_id = value elif name == 'dnsName' or name == 'publicDnsName': self.dns_name = value # backwards compatibility self.public_dns_name = value elif name == 'privateDnsName': self.private_dns_name = value elif name == 'keyName': self.key_name = value elif name == 'amiLaunchIndex': self.ami_launch_index = value elif name == 'shutdownState': self.shutdown_state = value elif name == 'previousState': self.previous_state = value elif name == 'name': self.state = value elif name == 'code': try: self.state_code = int(value) except ValueError: boto.log.warning('Error converting code (%s) to int' % value) self.state_code = value elif name == 'instanceType': self.instance_type = value elif name == 'instanceClass': self.instance_class = value elif name == 'rootDeviceName': self.root_device_name = value elif name == 'rootDeviceType': self.root_device_type = value elif name == 'launchTime': self.launch_time = value elif name == 'availabilityZone': self.placement = value elif name == 'placement': pass elif name == 'kernelId': self.kernel = value elif name == 'ramdiskId': self.ramdisk = value elif name == 'state': if self._in_monitoring_element: if value == 'enabled': self.monitored = True self._in_monitoring_element = False elif name == 'instanceClass': self.instance_class = value elif name == 'spotInstanceRequestId': self.spot_instance_request_id = value elif name == 'subnetId': self.subnet_id = value elif name == 'vpcId': self.vpc_id = value elif name == 'privateIpAddress': self.private_ip_address = value elif name == 'ipAddress': self.ip_address = value elif name == 'requesterId': self.requester_id = value elif name == 'persistent': if value == 'true': self.persistent = True else: self.persistent = False elif name == 'groupName': if self._in_monitoring_element: self.group_name = value elif name == 'clientToken': self.client_token = value else: setattr(self, name, value) def _update(self, updated): self.__dict__.update(updated.__dict__) def update(self, validate=False): """ Update the instance's state information by making a call to fetch the current instance attributes from the service. :type validate: bool :param validate: By default, if EC2 returns no data about the instance the update method returns quietly. If the validate param is True, however, it will raise a ValueError exception if no data is returned from EC2. """ rs = self.connection.get_all_instances([self.id]) if len(rs) > 0: r = rs[0] for i in r.instances: if i.id == self.id: self._update(i) elif validate: raise ValueError('%s is not a valid Instance ID' % self.id) return self.state def terminate(self): """ Terminate the instance """ rs = self.connection.terminate_instances([self.id]) if len(rs) > 0: self._update(rs[0]) def stop(self, force=False): """ Stop the instance :type force: bool :param force: Forces the instance to stop :rtype: list :return: A list of the instances stopped """ rs = self.connection.stop_instances([self.id]) if len(rs) > 0: self._update(rs[0]) def start(self): """ Start the instance. """ rs = self.connection.start_instances([self.id]) if len(rs) > 0: self._update(rs[0]) def reboot(self): return self.connection.reboot_instances([self.id]) def get_console_output(self): """ Retrieves the console output for the instance. :rtype: :class:`boto.ec2.instance.ConsoleOutput` :return: The console output as a ConsoleOutput object """ return self.connection.get_console_output(self.id) def confirm_product(self, product_code): return self.connection.confirm_product_instance(self.id, product_code) def use_ip(self, ip_address): if isinstance(ip_address, Address): ip_address = ip_address.public_ip return self.connection.associate_address(self.id, ip_address) def monitor(self): return self.connection.monitor_instance(self.id) def unmonitor(self): return self.connection.unmonitor_instance(self.id) def get_attribute(self, attribute): """ Gets an attribute from this instance. :type attribute: string :param attribute: The attribute you need information about Valid choices are: instanceType|kernel|ramdisk|userData| disableApiTermination| instanceInitiatedShutdownBehavior| rootDeviceName|blockDeviceMapping :rtype: :class:`boto.ec2.image.InstanceAttribute` :return: An InstanceAttribute object representing the value of the attribute requested """ return self.connection.get_instance_attribute(self.id, attribute) def modify_attribute(self, attribute, value): """ Changes an attribute of this instance :type attribute: string :param attribute: The attribute you wish to change. AttributeName - Expected value (default) instanceType - A valid instance type (m1.small) kernel - Kernel ID (None) ramdisk - Ramdisk ID (None) userData - Base64 encoded String (None) disableApiTermination - Boolean (true) instanceInitiatedShutdownBehavior - stop|terminate rootDeviceName - device name (None) :type value: string :param value: The new value for the attribute :rtype: bool :return: Whether the operation succeeded or not """ return self.connection.modify_instance_attribute(self.id, attribute, value) def reset_attribute(self, attribute): """ Resets an attribute of this instance to its default value. :type attribute: string :param attribute: The attribute to reset. Valid values are: kernel|ramdisk :rtype: bool :return: Whether the operation succeeded or not """ return self.connection.reset_instance_attribute(self.id, attribute) class Group: def __init__(self, parent=None): self.id = None self.name = None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'groupId': self.id = value elif name == 'groupName': self.name = value else: setattr(self, name, value) class ConsoleOutput: def __init__(self, parent=None): self.parent = parent self.instance_id = None self.timestamp = None self.output = None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'instanceId': self.instance_id = value elif name == 'timestamp': self.timestamp = value elif name == 'output': self.output = base64.b64decode(value) else: setattr(self, name, value) class InstanceAttribute(dict): ValidValues = ['instanceType', 'kernel', 'ramdisk', 'userData', 'disableApiTermination', 'instanceInitiatedShutdownBehavior', 'rootDeviceName', 'blockDeviceMapping', 'sourceDestCheck', 'groupSet'] def __init__(self, parent=None): dict.__init__(self) self.instance_id = None self.request_id = None self._current_value = None def startElement(self, name, attrs, connection): if name == 'blockDeviceMapping': self[name] = BlockDeviceMapping() return self[name] elif name == 'groupSet': self[name] = ResultSet([('item', Group)]) return self[name] else: return None def endElement(self, name, value, connection): if name == 'instanceId': self.instance_id = value elif name == 'requestId': self.request_id = value elif name == 'value': self._current_value = value elif name in self.ValidValues: self[name] = self._current_value class StateReason(dict): def __init__(self, parent=None): dict.__init__(self) def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name != 'stateReason': self[name] = value ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/instanceinfo.py ================================================ # Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class InstanceInfo(object): """ Represents an EC2 Instance status response from CloudWatch """ def __init__(self, connection=None, id=None, state=None): self.connection = connection self.id = id self.state = state def __repr__(self): return 'InstanceInfo:%s' % self.id def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'instanceId' or name == 'InstanceId': self.id = value elif name == 'state': self.state = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/keypair.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an EC2 Keypair """ import os from boto.ec2.ec2object import EC2Object from boto.exception import BotoClientError class KeyPair(EC2Object): def __init__(self, connection=None): EC2Object.__init__(self, connection) self.name = None self.fingerprint = None self.material = None def __repr__(self): return 'KeyPair:%s' % self.name def endElement(self, name, value, connection): if name == 'keyName': self.name = value elif name == 'keyFingerprint': self.fingerprint = value elif name == 'keyMaterial': self.material = value else: setattr(self, name, value) def delete(self): """ Delete the KeyPair. :rtype: bool :return: True if successful, otherwise False. """ return self.connection.delete_key_pair(self.name) def save(self, directory_path): """ Save the material (the unencrypted PEM encoded RSA private key) of a newly created KeyPair to a local file. :type directory_path: string :param directory_path: The fully qualified path to the directory in which the keypair will be saved. The keypair file will be named using the name of the keypair as the base name and .pem for the file extension. If a file of that name already exists in the directory, an exception will be raised and the old file will not be overwritten. :rtype: bool :return: True if successful. """ if self.material: directory_path = os.path.expanduser(directory_path) file_path = os.path.join(directory_path, '%s.pem' % self.name) if os.path.exists(file_path): raise BotoClientError('%s already exists, it will not be overwritten' % file_path) fp = open(file_path, 'wb') fp.write(self.material) fp.close() os.chmod(file_path, 0600) return True else: raise BotoClientError('KeyPair contains no material') def copy_to_region(self, region): """ Create a new key pair of the same new in another region. Note that the new key pair will use a different ssh cert than the this key pair. After doing the copy, you will need to save the material associated with the new key pair (use the save method) to a local file. :type region: :class:`boto.ec2.regioninfo.RegionInfo` :param region: The region to which this security group will be copied. :rtype: :class:`boto.ec2.keypair.KeyPair` :return: The new key pair """ if region.name == self.region: raise BotoClientError('Unable to copy to the same Region') conn_params = self.connection.get_params() rconn = region.connect(**conn_params) kp = rconn.create_key_pair(self.name) return kp ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/launchspecification.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents a launch specification for Spot instances. """ from boto.ec2.ec2object import EC2Object from boto.resultset import ResultSet from boto.ec2.blockdevicemapping import BlockDeviceMapping from boto.ec2.instance import Group class GroupList(list): def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'groupId': self.append(value) class LaunchSpecification(EC2Object): def __init__(self, connection=None): EC2Object.__init__(self, connection) self.key_name = None self.instance_type = None self.image_id = None self.groups = [] self.placement = None self.kernel = None self.ramdisk = None self.monitored = False self.subnet_id = None self._in_monitoring_element = False self.block_device_mapping = None def __repr__(self): return 'LaunchSpecification(%s)' % self.image_id def startElement(self, name, attrs, connection): if name == 'groupSet': self.groups = ResultSet([('item', Group)]) return self.groups elif name == 'monitoring': self._in_monitoring_element = True elif name == 'blockDeviceMapping': self.block_device_mapping = BlockDeviceMapping() return self.block_device_mapping else: return None def endElement(self, name, value, connection): if name == 'imageId': self.image_id = value elif name == 'keyName': self.key_name = value elif name == 'instanceType': self.instance_type = value elif name == 'availabilityZone': self.placement = value elif name == 'placement': pass elif name == 'kernelId': self.kernel = value elif name == 'ramdiskId': self.ramdisk = value elif name == 'subnetId': self.subnet_id = value elif name == 'state': if self._in_monitoring_element: if value == 'enabled': self.monitored = True self._in_monitoring_element = False else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/placementgroup.py ================================================ # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an EC2 Placement Group """ from boto.ec2.ec2object import EC2Object from boto.exception import BotoClientError class PlacementGroup(EC2Object): def __init__(self, connection=None, name=None, strategy=None, state=None): EC2Object.__init__(self, connection) self.name = name self.strategy = strategy self.state = state def __repr__(self): return 'PlacementGroup:%s' % self.name def endElement(self, name, value, connection): if name == 'groupName': self.name = value elif name == 'strategy': self.strategy = value elif name == 'state': self.state = value else: setattr(self, name, value) def delete(self): return self.connection.delete_placement_group(self.name) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/regioninfo.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.regioninfo import RegionInfo class EC2RegionInfo(RegionInfo): """ Represents an EC2 Region """ def __init__(self, connection=None, name=None, endpoint=None): from boto.ec2.connection import EC2Connection RegionInfo.__init__(self, connection, name, endpoint, EC2Connection) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/reservedinstance.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.ec2.ec2object import EC2Object class ReservedInstancesOffering(EC2Object): def __init__(self, connection=None, id=None, instance_type=None, availability_zone=None, duration=None, fixed_price=None, usage_price=None, description=None): EC2Object.__init__(self, connection) self.id = id self.instance_type = instance_type self.availability_zone = availability_zone self.duration = duration self.fixed_price = fixed_price self.usage_price = usage_price self.description = description def __repr__(self): return 'ReservedInstanceOffering:%s' % self.id def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'reservedInstancesOfferingId': self.id = value elif name == 'instanceType': self.instance_type = value elif name == 'availabilityZone': self.availability_zone = value elif name == 'duration': self.duration = value elif name == 'fixedPrice': self.fixed_price = value elif name == 'usagePrice': self.usage_price = value elif name == 'productDescription': self.description = value else: setattr(self, name, value) def describe(self): print 'ID=%s' % self.id print '\tInstance Type=%s' % self.instance_type print '\tZone=%s' % self.availability_zone print '\tDuration=%s' % self.duration print '\tFixed Price=%s' % self.fixed_price print '\tUsage Price=%s' % self.usage_price print '\tDescription=%s' % self.description def purchase(self, instance_count=1): return self.connection.purchase_reserved_instance_offering(self.id, instance_count) class ReservedInstance(ReservedInstancesOffering): def __init__(self, connection=None, id=None, instance_type=None, availability_zone=None, duration=None, fixed_price=None, usage_price=None, description=None, instance_count=None, state=None): ReservedInstancesOffering.__init__(self, connection, id, instance_type, availability_zone, duration, fixed_price, usage_price, description) self.instance_count = instance_count self.state = state def __repr__(self): return 'ReservedInstance:%s' % self.id def endElement(self, name, value, connection): if name == 'reservedInstancesId': self.id = value if name == 'instanceCount': self.instance_count = int(value) elif name == 'state': self.state = value else: ReservedInstancesOffering.endElement(self, name, value, connection) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/securitygroup.py ================================================ # Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an EC2 Security Group """ from boto.ec2.ec2object import TaggedEC2Object from boto.exception import BotoClientError class SecurityGroup(TaggedEC2Object): def __init__(self, connection=None, owner_id=None, name=None, description=None, id=None): TaggedEC2Object.__init__(self, connection) self.id = id self.owner_id = owner_id self.name = name self.description = description self.vpc_id = None self.rules = IPPermissionsList() self.rules_egress = IPPermissionsList() def __repr__(self): return 'SecurityGroup:%s' % self.name def startElement(self, name, attrs, connection): retval = TaggedEC2Object.startElement(self, name, attrs, connection) if retval is not None: return retval if name == 'ipPermissions': return self.rules elif name == 'ipPermissionsEgress': return self.rules_egress else: return None def endElement(self, name, value, connection): if name == 'ownerId': self.owner_id = value elif name == 'groupId': self.id = value elif name == 'groupName': self.name = value elif name == 'vpcId': self.vpc_id = value elif name == 'groupDescription': self.description = value elif name == 'ipRanges': pass elif name == 'return': if value == 'false': self.status = False elif value == 'true': self.status = True else: raise Exception( 'Unexpected value of status %s for group %s'%( value, self.name ) ) else: setattr(self, name, value) def delete(self): return self.connection.delete_security_group(self.name) def add_rule(self, ip_protocol, from_port, to_port, src_group_name, src_group_owner_id, cidr_ip): """ Add a rule to the SecurityGroup object. Note that this method only changes the local version of the object. No information is sent to EC2. """ rule = IPPermissions(self) rule.ip_protocol = ip_protocol rule.from_port = from_port rule.to_port = to_port self.rules.append(rule) rule.add_grant(src_group_name, src_group_owner_id, cidr_ip) def remove_rule(self, ip_protocol, from_port, to_port, src_group_name, src_group_owner_id, cidr_ip): """ Remove a rule to the SecurityGroup object. Note that this method only changes the local version of the object. No information is sent to EC2. """ target_rule = None for rule in self.rules: if rule.ip_protocol == ip_protocol: if rule.from_port == from_port: if rule.to_port == to_port: target_rule = rule target_grant = None for grant in rule.grants: if grant.name == src_group_name: if grant.owner_id == src_group_owner_id: if grant.cidr_ip == cidr_ip: target_grant = grant if target_grant: rule.grants.remove(target_grant) if len(rule.grants) == 0: self.rules.remove(target_rule) def authorize(self, ip_protocol=None, from_port=None, to_port=None, cidr_ip=None, src_group=None): """ Add a new rule to this security group. You need to pass in either src_group_name OR ip_protocol, from_port, to_port, and cidr_ip. In other words, either you are authorizing another group or you are authorizing some ip-based rule. :type ip_protocol: string :param ip_protocol: Either tcp | udp | icmp :type from_port: int :param from_port: The beginning port number you are enabling :type to_port: int :param to_port: The ending port number you are enabling :type cidr_ip: string :param cidr_ip: The CIDR block you are providing access to. See http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing :type src_group: :class:`boto.ec2.securitygroup.SecurityGroup` or :class:`boto.ec2.securitygroup.GroupOrCIDR` :param src_group: The Security Group you are granting access to. :rtype: bool :return: True if successful. """ if src_group: cidr_ip = None src_group_name = src_group.name src_group_owner_id = src_group.owner_id else: src_group_name = None src_group_owner_id = None status = self.connection.authorize_security_group(self.name, src_group_name, src_group_owner_id, ip_protocol, from_port, to_port, cidr_ip) if status: self.add_rule(ip_protocol, from_port, to_port, src_group_name, src_group_owner_id, cidr_ip) return status def revoke(self, ip_protocol=None, from_port=None, to_port=None, cidr_ip=None, src_group=None): if src_group: cidr_ip=None src_group_name = src_group.name src_group_owner_id = src_group.owner_id else: src_group_name = None src_group_owner_id = None status = self.connection.revoke_security_group(self.name, src_group_name, src_group_owner_id, ip_protocol, from_port, to_port, cidr_ip) if status: self.remove_rule(ip_protocol, from_port, to_port, src_group_name, src_group_owner_id, cidr_ip) return status def copy_to_region(self, region, name=None): """ Create a copy of this security group in another region. Note that the new security group will be a separate entity and will not stay in sync automatically after the copy operation. :type region: :class:`boto.ec2.regioninfo.RegionInfo` :param region: The region to which this security group will be copied. :type name: string :param name: The name of the copy. If not supplied, the copy will have the same name as this security group. :rtype: :class:`boto.ec2.securitygroup.SecurityGroup` :return: The new security group. """ if region.name == self.region: raise BotoClientError('Unable to copy to the same Region') conn_params = self.connection.get_params() rconn = region.connect(**conn_params) sg = rconn.create_security_group(name or self.name, self.description) source_groups = [] for rule in self.rules: grant = rule.grants[0] for grant in rule.grants: if grant.name: if grant.name not in source_groups: source_groups.append(grant.name) sg.authorize(None, None, None, None, grant) else: sg.authorize(rule.ip_protocol, rule.from_port, rule.to_port, grant.cidr_ip) return sg def instances(self): """ Find all of the current instances that are running within this security group. :rtype: list of :class:`boto.ec2.instance.Instance` :return: A list of Instance objects """ # It would be more efficient to do this with filters now # but not all services that implement EC2 API support filters. instances = [] rs = self.connection.get_all_instances() for reservation in rs: uses_group = [g.name for g in reservation.groups if g.name == self.name] if uses_group: instances.extend(reservation.instances) return instances class IPPermissionsList(list): def startElement(self, name, attrs, connection): if name == 'item': self.append(IPPermissions(self)) return self[-1] return None def endElement(self, name, value, connection): pass class IPPermissions(object): def __init__(self, parent=None): self.parent = parent self.ip_protocol = None self.from_port = None self.to_port = None self.grants = [] def __repr__(self): return 'IPPermissions:%s(%s-%s)' % (self.ip_protocol, self.from_port, self.to_port) def startElement(self, name, attrs, connection): if name == 'item': self.grants.append(GroupOrCIDR(self)) return self.grants[-1] return None def endElement(self, name, value, connection): if name == 'ipProtocol': self.ip_protocol = value elif name == 'fromPort': self.from_port = value elif name == 'toPort': self.to_port = value else: setattr(self, name, value) def add_grant(self, name=None, owner_id=None, cidr_ip=None): grant = GroupOrCIDR(self) grant.owner_id = owner_id grant.name = name grant.cidr_ip = cidr_ip self.grants.append(grant) return grant class GroupOrCIDR(object): def __init__(self, parent=None): self.owner_id = None self.name = None self.cidr_ip = None def __repr__(self): if self.cidr_ip: return '%s' % self.cidr_ip else: return '%s-%s' % (self.name, self.owner_id) def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'userId': self.owner_id = value elif name == 'groupName': self.name = value if name == 'cidrIp': self.cidr_ip = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/snapshot.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an EC2 Elastic Block Store Snapshot """ from boto.ec2.ec2object import TaggedEC2Object class Snapshot(TaggedEC2Object): AttrName = 'createVolumePermission' def __init__(self, connection=None): TaggedEC2Object.__init__(self, connection) self.id = None self.volume_id = None self.status = None self.progress = None self.start_time = None self.owner_id = None self.volume_size = None self.description = None def __repr__(self): return 'Snapshot:%s' % self.id def endElement(self, name, value, connection): if name == 'snapshotId': self.id = value elif name == 'volumeId': self.volume_id = value elif name == 'status': self.status = value elif name == 'startTime': self.start_time = value elif name == 'ownerId': self.owner_id = value elif name == 'volumeSize': try: self.volume_size = int(value) except: self.volume_size = value elif name == 'description': self.description = value else: setattr(self, name, value) def _update(self, updated): self.progress = updated.progress self.status = updated.status def update(self, validate=False): """ Update the data associated with this snapshot by querying EC2. :type validate: bool :param validate: By default, if EC2 returns no data about the snapshot the update method returns quietly. If the validate param is True, however, it will raise a ValueError exception if no data is returned from EC2. """ rs = self.connection.get_all_snapshots([self.id]) if len(rs) > 0: self._update(rs[0]) elif validate: raise ValueError('%s is not a valid Snapshot ID' % self.id) return self.progress def delete(self): return self.connection.delete_snapshot(self.id) def get_permissions(self): attrs = self.connection.get_snapshot_attribute(self.id, self.AttrName) return attrs.attrs def share(self, user_ids=None, groups=None): return self.connection.modify_snapshot_attribute(self.id, self.AttrName, 'add', user_ids, groups) def unshare(self, user_ids=None, groups=None): return self.connection.modify_snapshot_attribute(self.id, self.AttrName, 'remove', user_ids, groups) def reset_permissions(self): return self.connection.reset_snapshot_attribute(self.id, self.AttrName) class SnapshotAttribute: def __init__(self, parent=None): self.snapshot_id = None self.attrs = {} def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'createVolumePermission': self.name = 'create_volume_permission' elif name == 'group': if self.attrs.has_key('groups'): self.attrs['groups'].append(value) else: self.attrs['groups'] = [value] elif name == 'userId': if self.attrs.has_key('user_ids'): self.attrs['user_ids'].append(value) else: self.attrs['user_ids'] = [value] elif name == 'snapshotId': self.snapshot_id = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/spotdatafeedsubscription.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an EC2 Spot Instance Datafeed Subscription """ from boto.ec2.ec2object import EC2Object from boto.ec2.spotinstancerequest import SpotInstanceStateFault class SpotDatafeedSubscription(EC2Object): def __init__(self, connection=None, owner_id=None, bucket=None, prefix=None, state=None,fault=None): EC2Object.__init__(self, connection) self.owner_id = owner_id self.bucket = bucket self.prefix = prefix self.state = state self.fault = fault def __repr__(self): return 'SpotDatafeedSubscription:%s' % self.bucket def startElement(self, name, attrs, connection): if name == 'fault': self.fault = SpotInstanceStateFault() return self.fault else: return None def endElement(self, name, value, connection): if name == 'ownerId': self.owner_id = value elif name == 'bucket': self.bucket = value elif name == 'prefix': self.prefix = value elif name == 'state': self.state = value else: setattr(self, name, value) def delete(self): return self.connection.delete_spot_datafeed_subscription() ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/spotinstancerequest.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an EC2 Spot Instance Request """ from boto.ec2.ec2object import TaggedEC2Object from boto.ec2.launchspecification import LaunchSpecification class SpotInstanceStateFault(object): def __init__(self, code=None, message=None): self.code = code self.message = message def __repr__(self): return '(%s, %s)' % (self.code, self.message) def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'code': self.code = value elif name == 'message': self.message = value setattr(self, name, value) class SpotInstanceRequest(TaggedEC2Object): def __init__(self, connection=None): TaggedEC2Object.__init__(self, connection) self.id = None self.price = None self.type = None self.state = None self.fault = None self.valid_from = None self.valid_until = None self.launch_group = None self.product_description = None self.availability_zone_group = None self.create_time = None self.launch_specification = None self.instance_id = None def __repr__(self): return 'SpotInstanceRequest:%s' % self.id def startElement(self, name, attrs, connection): retval = TaggedEC2Object.startElement(self, name, attrs, connection) if retval is not None: return retval if name == 'launchSpecification': self.launch_specification = LaunchSpecification(connection) return self.launch_specification elif name == 'fault': self.fault = SpotInstanceStateFault() return self.fault else: return None def endElement(self, name, value, connection): if name == 'spotInstanceRequestId': self.id = value elif name == 'spotPrice': self.price = float(value) elif name == 'type': self.type = value elif name == 'state': self.state = value elif name == 'productDescription': self.product_description = value elif name == 'validFrom': self.valid_from = value elif name == 'validUntil': self.valid_until = value elif name == 'launchGroup': self.launch_group = value elif name == 'availabilityZoneGroup': self.availability_zone_group = value elif name == 'createTime': self.create_time = value elif name == 'instanceId': self.instance_id = value else: setattr(self, name, value) def cancel(self): self.connection.cancel_spot_instance_requests([self.id]) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/spotpricehistory.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an EC2 Spot Instance Request """ from boto.ec2.ec2object import EC2Object class SpotPriceHistory(EC2Object): def __init__(self, connection=None): EC2Object.__init__(self, connection) self.price = 0.0 self.instance_type = None self.product_description = None self.timestamp = None self.availability_zone = None def __repr__(self): return 'SpotPriceHistory(%s):%2f' % (self.instance_type, self.price) def endElement(self, name, value, connection): if name == 'instanceType': self.instance_type = value elif name == 'spotPrice': self.price = float(value) elif name == 'productDescription': self.product_description = value elif name == 'timestamp': self.timestamp = value elif name == 'availabilityZone': self.availability_zone = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/tag.py ================================================ # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class TagSet(dict): """ A TagSet is used to collect the tags associated with a particular EC2 resource. Not all resources can be tagged but for those that can, this dict object will be used to collect those values. See :class:`boto.ec2.ec2object.TaggedEC2Object` for more details. """ def __init__(self, connection=None): self.connection = connection self._current_key = None self._current_value = None def startElement(self, name, attrs, connection): if name == 'item': self._current_key = None self._current_value = None return None def endElement(self, name, value, connection): if name == 'key': self._current_key = value elif name == 'value': self._current_value = value elif name == 'item': self[self._current_key] = self._current_value class Tag(object): """ A Tag is used when creating or listing all tags related to an AWS account. It records not only the key and value but also the ID of the resource to which the tag is attached as well as the type of the resource. """ def __init__(self, connection=None, res_id=None, res_type=None, name=None, value=None): self.connection = connection self.res_id = res_id self.res_type = res_type self.name = name self.value = value def __repr__(self): return 'Tag:%s' % self.name def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'resourceId': self.res_id = value elif name == 'resourceType': self.res_type = value elif name == 'key': self.name = value elif name == 'value': self.value = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/volume.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an EC2 Elastic Block Storage Volume """ from boto.ec2.ec2object import TaggedEC2Object class Volume(TaggedEC2Object): def __init__(self, connection=None): TaggedEC2Object.__init__(self, connection) self.id = None self.create_time = None self.status = None self.size = None self.snapshot_id = None self.attach_data = None self.zone = None def __repr__(self): return 'Volume:%s' % self.id def startElement(self, name, attrs, connection): retval = TaggedEC2Object.startElement(self, name, attrs, connection) if retval is not None: return retval if name == 'attachmentSet': self.attach_data = AttachmentSet() return self.attach_data elif name == 'tagSet': self.tags = boto.resultset.ResultSet([('item', Tag)]) return self.tags else: return None def endElement(self, name, value, connection): if name == 'volumeId': self.id = value elif name == 'createTime': self.create_time = value elif name == 'status': if value != '': self.status = value elif name == 'size': self.size = int(value) elif name == 'snapshotId': self.snapshot_id = value elif name == 'availabilityZone': self.zone = value else: setattr(self, name, value) def _update(self, updated): self.__dict__.update(updated.__dict__) def update(self, validate=False): """ Update the data associated with this volume by querying EC2. :type validate: bool :param validate: By default, if EC2 returns no data about the volume the update method returns quietly. If the validate param is True, however, it will raise a ValueError exception if no data is returned from EC2. """ rs = self.connection.get_all_volumes([self.id]) if len(rs) > 0: self._update(rs[0]) elif validate: raise ValueError('%s is not a valid Volume ID' % self.id) return self.status def delete(self): """ Delete this EBS volume. :rtype: bool :return: True if successful """ return self.connection.delete_volume(self.id) def attach(self, instance_id, device): """ Attach this EBS volume to an EC2 instance. :type instance_id: str :param instance_id: The ID of the EC2 instance to which it will be attached. :type device: str :param device: The device on the instance through which the volume will be exposed (e.g. /dev/sdh) :rtype: bool :return: True if successful """ return self.connection.attach_volume(self.id, instance_id, device) def detach(self, force=False): """ Detach this EBS volume from an EC2 instance. :type force: bool :param force: Forces detachment if the previous detachment attempt did not occur cleanly. This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance will not have an opportunity to flush file system caches nor file system meta data. If you use this option, you must perform file system check and repair procedures. :rtype: bool :return: True if successful """ instance_id = None if self.attach_data: instance_id = self.attach_data.instance_id device = None if self.attach_data: device = self.attach_data.device return self.connection.detach_volume(self.id, instance_id, device, force) def create_snapshot(self, description=None): """ Create a snapshot of this EBS Volume. :type description: str :param description: A description of the snapshot. Limited to 256 characters. :rtype: bool :return: True if successful """ return self.connection.create_snapshot(self.id, description) def volume_state(self): """ Returns the state of the volume. Same value as the status attribute. """ return self.status def attachment_state(self): """ Get the attachment state. """ state = None if self.attach_data: state = self.attach_data.status return state def snapshots(self, owner=None, restorable_by=None): """ Get all snapshots related to this volume. Note that this requires that all available snapshots for the account be retrieved from EC2 first and then the list is filtered client-side to contain only those for this volume. :type owner: str :param owner: If present, only the snapshots owned by the specified user will be returned. Valid values are: self | amazon | AWS Account ID :type restorable_by: str :param restorable_by: If present, only the snapshots that are restorable by the specified account id will be returned. :rtype: list of L{boto.ec2.snapshot.Snapshot} :return: The requested Snapshot objects """ rs = self.connection.get_all_snapshots(owner=owner, restorable_by=restorable_by) mine = [] for snap in rs: if snap.volume_id == self.id: mine.append(snap) return mine class AttachmentSet(object): def __init__(self): self.id = None self.instance_id = None self.status = None self.attach_time = None self.device = None def __repr__(self): return 'AttachmentSet:%s' % self.id def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'volumeId': self.id = value elif name == 'instanceId': self.instance_id = value elif name == 'status': self.status = value elif name == 'attachTime': self.attach_time = value elif name == 'device': self.device = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ec2/zone.py ================================================ # Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an EC2 Availability Zone """ from boto.ec2.ec2object import EC2Object class Zone(EC2Object): def __init__(self, connection=None): EC2Object.__init__(self, connection) self.name = None self.state = None def __repr__(self): return 'Zone:%s' % self.name def endElement(self, name, value, connection): if name == 'zoneName': self.name = value elif name == 'zoneState': self.state = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ecs/__init__.py ================================================ # Copyright (c) 2010 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import boto from boto.connection import AWSQueryConnection, AWSAuthConnection import time import urllib import xml.sax from boto.ecs.item import ItemSet from boto import handler class ECSConnection(AWSQueryConnection): """ ECommerce Connection For more information on how to use this module see: http://blog.coredumped.org/2010/09/search-for-books-on-amazon-using-boto.html """ APIVersion = '2010-11-01' def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, host='ecs.amazonaws.com', debug=0, https_connection_factory=None, path='/'): AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, host, debug, https_connection_factory, path) def _required_auth_capability(self): return ['ecs'] def get_response(self, action, params, page=0, itemSet=None): """ Utility method to handle calls to ECS and parsing of responses. """ params['Service'] = "AWSECommerceService" params['Operation'] = action if page: params['ItemPage'] = page response = self.make_request(None, params, "/onca/xml") body = response.read() boto.log.debug(body) if response.status != 200: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) if itemSet == None: rs = ItemSet(self, action, params, page) else: rs = itemSet h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs # # Group methods # def item_search(self, search_index, **params): """ Returns items that satisfy the search criteria, including one or more search indices. For a full list of search terms, :see: http://docs.amazonwebservices.com/AWSECommerceService/2010-09-01/DG/index.html?ItemSearch.html """ params['SearchIndex'] = search_index return self.get_response('ItemSearch', params) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ecs/item.py ================================================ # Copyright (c) 2010 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import xml.sax import cgi from StringIO import StringIO class ResponseGroup(xml.sax.ContentHandler): """A Generic "Response Group", which can be anything from the entire list of Items to specific response elements within an item""" def __init__(self, connection=None, nodename=None): """Initialize this Item""" self._connection = connection self._nodename = nodename self._nodepath = [] self._curobj = None self._xml = StringIO() def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, self.__dict__) # # Attribute Functions # def get(self, name): return self.__dict__.get(name) def set(self, name, value): self.__dict__[name] = value def to_xml(self): return "<%s>%s" % (self._nodename, self._xml.getvalue(), self._nodename) # # XML Parser functions # def startElement(self, name, attrs, connection): self._xml.write("<%s>" % name) self._nodepath.append(name) if len(self._nodepath) == 1: obj = ResponseGroup(self._connection) self.set(name, obj) self._curobj = obj elif self._curobj: self._curobj.startElement(name, attrs, connection) return None def endElement(self, name, value, connection): self._xml.write("%s" % (cgi.escape(value).replace("&amp;", "&"), name)) if len(self._nodepath) == 0: return obj = None curval = self.get(name) if len(self._nodepath) == 1: if value or not curval: self.set(name, value) if self._curobj: self._curobj = None #elif len(self._nodepath) == 2: #self._curobj = None elif self._curobj: self._curobj.endElement(name, value, connection) self._nodepath.pop() return None class Item(ResponseGroup): """A single Item""" def __init__(self, connection=None): """Initialize this Item""" ResponseGroup.__init__(self, connection, "Item") class ItemSet(ResponseGroup): """A special ResponseGroup that has built-in paging, and only creates new Items on the "Item" tag""" def __init__(self, connection, action, params, page=0): ResponseGroup.__init__(self, connection, "Items") self.objs = [] self.iter = None self.page = page self.action = action self.params = params self.curItem = None self.total_results = 0 self.total_pages = 0 def startElement(self, name, attrs, connection): if name == "Item": self.curItem = Item(self._connection) elif self.curItem != None: self.curItem.startElement(name, attrs, connection) return None def endElement(self, name, value, connection): if name == 'TotalResults': self.total_results = value elif name == 'TotalPages': self.total_pages = value elif name == "Item": self.objs.append(self.curItem) self._xml.write(self.curItem.to_xml()) self.curItem = None elif self.curItem != None: self.curItem.endElement(name, value, connection) return None def next(self): """Special paging functionality""" if self.iter == None: self.iter = iter(self.objs) try: return self.iter.next() except StopIteration: self.iter = None self.objs = [] if int(self.page) < int(self.total_pages): self.page += 1 self._connection.get_response(self.action, self.params, self.page, self) return self.next() else: raise def __iter__(self): return self def to_xml(self): """Override to first fetch everything""" for item in self: pass return ResponseGroup.to_xml(self) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/emr/__init__.py ================================================ # Copyright (c) 2010 Spotify AB # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ This module provies an interface to the Elastic MapReduce (EMR) service from AWS. """ from connection import EmrConnection from step import Step, StreamingStep, JarStep from bootstrap_action import BootstrapAction ================================================ FILE: deploy/third_party/boto-2.1.1/boto/emr/bootstrap_action.py ================================================ # Copyright (c) 2010 Spotify AB # Copyright (c) 2010 Yelp # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class BootstrapAction(object): def __init__(self, name, path, bootstrap_action_args): self.name = name self.path = path if isinstance(bootstrap_action_args, basestring): bootstrap_action_args = [bootstrap_action_args] self.bootstrap_action_args = bootstrap_action_args def args(self): args = [] if self.bootstrap_action_args: args.extend(self.bootstrap_action_args) return args def __repr__(self): return '%s.%s(name=%r, path=%r, bootstrap_action_args=%r)' % ( self.__class__.__module__, self.__class__.__name__, self.name, self.path, self.bootstrap_action_args) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/emr/connection.py ================================================ # Copyright (c) 2010 Spotify AB # Copyright (c) 2010-2011 Yelp # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents a connection to the EMR service """ import types import boto import boto.utils from boto.ec2.regioninfo import RegionInfo from boto.emr.emrobject import JobFlow, RunJobFlowResponse from boto.emr.emrobject import AddInstanceGroupsResponse, ModifyInstanceGroupsResponse from boto.emr.step import JarStep from boto.connection import AWSQueryConnection from boto.exception import EmrResponseError class EmrConnection(AWSQueryConnection): APIVersion = boto.config.get('Boto', 'emr_version', '2009-03-31') DefaultRegionName = boto.config.get('Boto', 'emr_region_name', 'us-east-1') DefaultRegionEndpoint = boto.config.get('Boto', 'emr_region_endpoint', 'elasticmapreduce.amazonaws.com') ResponseError = EmrResponseError # Constants for AWS Console debugging DebuggingJar = 's3n://us-east-1.elasticmapreduce/libs/script-runner/script-runner.jar' DebuggingArgs = 's3n://us-east-1.elasticmapreduce/libs/state-pusher/0.1/fetch' def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, region=None, path='/'): if not region: region = RegionInfo(self, self.DefaultRegionName, self.DefaultRegionEndpoint) self.region = region AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, self.region.endpoint, debug, https_connection_factory, path) def _required_auth_capability(self): return ['emr'] def describe_jobflow(self, jobflow_id): """ Describes a single Elastic MapReduce job flow :type jobflow_id: str :param jobflow_id: The job flow id of interest """ jobflows = self.describe_jobflows(jobflow_ids=[jobflow_id]) if jobflows: return jobflows[0] def describe_jobflows(self, states=None, jobflow_ids=None, created_after=None, created_before=None): """ Retrieve all the Elastic MapReduce job flows on your account :type states: list :param states: A list of strings with job flow states wanted :type jobflow_ids: list :param jobflow_ids: A list of job flow IDs :type created_after: datetime :param created_after: Bound on job flow creation time :type created_before: datetime :param created_before: Bound on job flow creation time """ params = {} if states: self.build_list_params(params, states, 'JobFlowStates.member') if jobflow_ids: self.build_list_params(params, jobflow_ids, 'JobFlowIds.member') if created_after: params['CreatedAfter'] = created_after.strftime( boto.utils.ISO8601) if created_before: params['CreatedBefore'] = created_before.strftime( boto.utils.ISO8601) return self.get_list('DescribeJobFlows', params, [('member', JobFlow)]) def terminate_jobflow(self, jobflow_id): """ Terminate an Elastic MapReduce job flow :type jobflow_id: str :param jobflow_id: A jobflow id """ self.terminate_jobflows([jobflow_id]) def terminate_jobflows(self, jobflow_ids): """ Terminate an Elastic MapReduce job flow :type jobflow_ids: list :param jobflow_ids: A list of job flow IDs """ params = {} self.build_list_params(params, jobflow_ids, 'JobFlowIds.member') return self.get_status('TerminateJobFlows', params, verb='POST') def add_jobflow_steps(self, jobflow_id, steps): """ Adds steps to a jobflow :type jobflow_id: str :param jobflow_id: The job flow id :type steps: list(boto.emr.Step) :param steps: A list of steps to add to the job """ if type(steps) != types.ListType: steps = [steps] params = {} params['JobFlowId'] = jobflow_id # Step args step_args = [self._build_step_args(step) for step in steps] params.update(self._build_step_list(step_args)) return self.get_object( 'AddJobFlowSteps', params, RunJobFlowResponse, verb='POST') def add_instance_groups(self, jobflow_id, instance_groups): """ Adds instance groups to a running cluster. :type jobflow_id: str :param jobflow_id: The id of the jobflow which will take the new instance groups :type instance_groups: list(boto.emr.InstanceGroup) :param instance_groups: A list of instance groups to add to the job """ if type(instance_groups) != types.ListType: instance_groups = [instance_groups] params = {} params['JobFlowId'] = jobflow_id params.update(self._build_instance_group_list_args(instance_groups)) return self.get_object('AddInstanceGroups', params, AddInstanceGroupsResponse, verb='POST') def modify_instance_groups(self, instance_group_ids, new_sizes): """ Modify the number of nodes and configuration settings in an instance group. :type instance_group_ids: list(str) :param instance_group_ids: A list of the ID's of the instance groups to be modified :type new_sizes: list(int) :param new_sizes: A list of the new sizes for each instance group """ if type(instance_group_ids) != types.ListType: instance_group_ids = [instance_group_ids] if type(new_sizes) != types.ListType: new_sizes = [new_sizes] instance_groups = zip(instance_group_ids, new_sizes) params = {} for k, ig in enumerate(instance_groups): #could be wrong - the example amazon gives uses InstanceRequestCount, #while the api documentation says InstanceCount params['InstanceGroups.member.%d.InstanceGroupId' % (k+1) ] = ig[0] params['InstanceGroups.member.%d.InstanceCount' % (k+1) ] = ig[1] return self.get_object('ModifyInstanceGroups', params, ModifyInstanceGroupsResponse, verb='POST') def run_jobflow(self, name, log_uri, ec2_keyname=None, availability_zone=None, master_instance_type='m1.small', slave_instance_type='m1.small', num_instances=1, action_on_failure='TERMINATE_JOB_FLOW', keep_alive=False, enable_debugging=False, hadoop_version='0.20', steps=[], bootstrap_actions=[], instance_groups=None, additional_info=None): """ Runs a job flow :type name: str :param name: Name of the job flow :type log_uri: str :param log_uri: URI of the S3 bucket to place logs :type ec2_keyname: str :param ec2_keyname: EC2 key used for the instances :type availability_zone: str :param availability_zone: EC2 availability zone of the cluster :type master_instance_type: str :param master_instance_type: EC2 instance type of the master :type slave_instance_type: str :param slave_instance_type: EC2 instance type of the slave nodes :type num_instances: int :param num_instances: Number of instances in the Hadoop cluster :type action_on_failure: str :param action_on_failure: Action to take if a step terminates :type keep_alive: bool :param keep_alive: Denotes whether the cluster should stay alive upon completion :type enable_debugging: bool :param enable_debugging: Denotes whether AWS console debugging should be enabled. :type steps: list(boto.emr.Step) :param steps: List of steps to add with the job :type bootstrap_actions: list(boto.emr.BootstrapAction) :param bootstrap_actions: List of bootstrap actions that run before Hadoop starts. :type instance_groups: list(boto.emr.InstanceGroup) :param instance_groups: Optional list of instance groups to use when creating this job. NB: When provided, this argument supersedes num_instances and master/slave_instance_type. :type additional_info: JSON str :param additional_info: A JSON string for selecting additional features :rtype: str :return: The jobflow id """ params = {} if action_on_failure: params['ActionOnFailure'] = action_on_failure params['Name'] = name params['LogUri'] = log_uri # Common instance args common_params = self._build_instance_common_args(ec2_keyname, availability_zone, keep_alive, hadoop_version) params.update(common_params) # NB: according to the AWS API's error message, we must # "configure instances either using instance count, master and # slave instance type or instance groups but not both." # # Thus we switch here on the truthiness of instance_groups. if not instance_groups: # Instance args (the common case) instance_params = self._build_instance_count_and_type_args( master_instance_type, slave_instance_type, num_instances) params.update(instance_params) else: # Instance group args (for spot instances or a heterogenous cluster) list_args = self._build_instance_group_list_args(instance_groups) instance_params = dict( ('Instances.%s' % k, v) for k, v in list_args.iteritems() ) params.update(instance_params) # Debugging step from EMR API docs if enable_debugging: debugging_step = JarStep(name='Setup Hadoop Debugging', action_on_failure='TERMINATE_JOB_FLOW', main_class=None, jar=self.DebuggingJar, step_args=self.DebuggingArgs) steps.insert(0, debugging_step) # Step args if steps: step_args = [self._build_step_args(step) for step in steps] params.update(self._build_step_list(step_args)) if bootstrap_actions: bootstrap_action_args = [self._build_bootstrap_action_args(bootstrap_action) for bootstrap_action in bootstrap_actions] params.update(self._build_bootstrap_action_list(bootstrap_action_args)) if additional_info is not None: params['AdditionalInfo'] = additional_info response = self.get_object( 'RunJobFlow', params, RunJobFlowResponse, verb='POST') return response.jobflowid def set_termination_protection(self, jobflow_id, termination_protection_status): """ Set termination protection on specified Elastic MapReduce job flows :type jobflow_ids: list or str :param jobflow_ids: A list of job flow IDs :type termination_protection_status: bool :param termination_protection_status: Termination protection status """ assert termination_protection_status in (True, False) params = {} params['TerminationProtected'] = (termination_protection_status and "true") or "false" self.build_list_params(params, [jobflow_id], 'JobFlowIds.member') return self.get_status('SetTerminationProtection', params, verb='POST') def _build_bootstrap_action_args(self, bootstrap_action): bootstrap_action_params = {} bootstrap_action_params['ScriptBootstrapAction.Path'] = bootstrap_action.path try: bootstrap_action_params['Name'] = bootstrap_action.name except AttributeError: pass args = bootstrap_action.args() if args: self.build_list_params(bootstrap_action_params, args, 'ScriptBootstrapAction.Args.member') return bootstrap_action_params def _build_step_args(self, step): step_params = {} step_params['ActionOnFailure'] = step.action_on_failure step_params['HadoopJarStep.Jar'] = step.jar() main_class = step.main_class() if main_class: step_params['HadoopJarStep.MainClass'] = main_class args = step.args() if args: self.build_list_params(step_params, args, 'HadoopJarStep.Args.member') step_params['Name'] = step.name return step_params def _build_bootstrap_action_list(self, bootstrap_actions): if type(bootstrap_actions) != types.ListType: bootstrap_actions = [bootstrap_actions] params = {} for i, bootstrap_action in enumerate(bootstrap_actions): for key, value in bootstrap_action.iteritems(): params['BootstrapActions.member.%s.%s' % (i + 1, key)] = value return params def _build_step_list(self, steps): if type(steps) != types.ListType: steps = [steps] params = {} for i, step in enumerate(steps): for key, value in step.iteritems(): params['Steps.member.%s.%s' % (i+1, key)] = value return params def _build_instance_common_args(self, ec2_keyname, availability_zone, keep_alive, hadoop_version): """ Takes a number of parameters used when starting a jobflow (as specified in run_jobflow() above). Returns a comparable dict for use in making a RunJobFlow request. """ params = { 'Instances.KeepJobFlowAliveWhenNoSteps' : str(keep_alive).lower(), 'Instances.HadoopVersion' : hadoop_version } if ec2_keyname: params['Instances.Ec2KeyName'] = ec2_keyname if availability_zone: params['Instances.Placement.AvailabilityZone'] = availability_zone return params def _build_instance_count_and_type_args(self, master_instance_type, slave_instance_type, num_instances): """ Takes a master instance type (string), a slave instance type (string), and a number of instances. Returns a comparable dict for use in making a RunJobFlow request. """ params = { 'Instances.MasterInstanceType' : master_instance_type, 'Instances.SlaveInstanceType' : slave_instance_type, 'Instances.InstanceCount' : num_instances, } return params def _build_instance_group_args(self, instance_group): """ Takes an InstanceGroup; returns a dict that, when its keys are properly prefixed, can be used for describing InstanceGroups in RunJobFlow or AddInstanceGroups requests. """ params = { 'InstanceCount' : instance_group.num_instances, 'InstanceRole' : instance_group.role, 'InstanceType' : instance_group.type, 'Name' : instance_group.name, 'Market' : instance_group.market } if instance_group.market == 'SPOT': params['BidPrice'] = instance_group.bidprice return params def _build_instance_group_list_args(self, instance_groups): """ Takes a list of InstanceGroups, or a single InstanceGroup. Returns a comparable dict for use in making a RunJobFlow or AddInstanceGroups request. """ if type(instance_groups) != types.ListType: instance_groups = [instance_groups] params = {} for i, instance_group in enumerate(instance_groups): ig_dict = self._build_instance_group_args(instance_group) for key, value in ig_dict.iteritems(): params['InstanceGroups.member.%d.%s' % (i+1, key)] = value return params ================================================ FILE: deploy/third_party/boto-2.1.1/boto/emr/emrobject.py ================================================ # Copyright (c) 2010 Spotify AB # Copyright (c) 2010 Jeremy Thurgood # Copyright (c) 2010-2011 Yelp # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ This module contains EMR response objects """ from boto.resultset import ResultSet class EmrObject(object): Fields = set() def __init__(self, connection=None): self.connection = connection def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name in self.Fields: setattr(self, name.lower(), value) class RunJobFlowResponse(EmrObject): Fields = set(['JobFlowId']) class AddInstanceGroupsResponse(EmrObject): Fields = set(['InstanceGroupIds', 'JobFlowId']) class ModifyInstanceGroupsResponse(EmrObject): Fields = set(['RequestId']) class Arg(EmrObject): def __init__(self, connection=None): self.value = None def endElement(self, name, value, connection): self.value = value class BootstrapAction(EmrObject): Fields = set([ 'Args', 'Name', 'Path', ]) def startElement(self, name, attrs, connection): if name == 'Args': self.args = ResultSet([('member', Arg)]) return self.args class KeyValue(EmrObject): Fields = set([ 'Key', 'Value', ]) class Step(EmrObject): Fields = set([ 'ActionOnFailure', 'CreationDateTime', 'EndDateTime', 'Jar', 'LastStateChangeReason', 'MainClass', 'Name', 'StartDateTime', 'State', ]) def __init__(self, connection=None): self.connection = connection self.args = None def startElement(self, name, attrs, connection): if name == 'Args': self.args = ResultSet([('member', Arg)]) return self.args if name == 'Properties': self.properties = ResultSet([('member', KeyValue)]) return self.properties class InstanceGroup(EmrObject): Fields = set([ 'BidPrice', 'CreationDateTime', 'EndDateTime', 'InstanceGroupId', 'InstanceRequestCount', 'InstanceRole', 'InstanceRunningCount', 'InstanceType', 'LastStateChangeReason', 'LaunchGroup', 'Market', 'Name', 'ReadyDateTime', 'StartDateTime', 'State', ]) class JobFlow(EmrObject): Fields = set([ 'AvailabilityZone', 'CreationDateTime', 'Ec2KeyName', 'EndDateTime', 'HadoopVersion', 'Id', 'InstanceCount', 'JobFlowId', 'KeepJobFlowAliveWhenNoSteps', 'LastStateChangeReason', 'LogUri', 'MasterInstanceId', 'MasterInstanceType', 'MasterPublicDnsName', 'Name', 'NormalizedInstanceHours', 'ReadyDateTime', 'RequestId', 'SlaveInstanceType', 'StartDateTime', 'State', 'TerminationProtected', 'Type', 'Value', ]) def __init__(self, connection=None): self.connection = connection self.steps = None self.instancegroups = None self.bootstrapactions = None def startElement(self, name, attrs, connection): if name == 'Steps': self.steps = ResultSet([('member', Step)]) return self.steps elif name == 'InstanceGroups': self.instancegroups = ResultSet([('member', InstanceGroup)]) return self.instancegroups elif name == 'BootstrapActions': self.bootstrapactions = ResultSet([('member', BootstrapAction)]) return self.bootstrapactions else: return None ================================================ FILE: deploy/third_party/boto-2.1.1/boto/emr/instance_group.py ================================================ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class InstanceGroup(object): def __init__(self, num_instances, role, type, market, name, bidprice=None): self.num_instances = num_instances self.role = role self.type = type self.market = market self.name = name if market == 'SPOT': if not isinstance(bidprice, basestring): raise ValueError('bidprice must be specified if market == SPOT') self.bidprice = bidprice def __repr__(self): if self.market == 'SPOT': return '%s.%s(name=%r, num_instances=%r, role=%r, type=%r, market = %r, bidprice = %r)' % ( self.__class__.__module__, self.__class__.__name__, self.name, self.num_instances, self.role, self.type, self.market, self.bidprice) else: return '%s.%s(name=%r, num_instances=%r, role=%r, type=%r, market = %r)' % ( self.__class__.__module__, self.__class__.__name__, self.name, self.num_instances, self.role, self.type, self.market) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/emr/step.py ================================================ # Copyright (c) 2010 Spotify AB # Copyright (c) 2010-2011 Yelp # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class Step(object): """ Jobflow Step base class """ def jar(self): """ :rtype: str :return: URI to the jar """ raise NotImplemented() def args(self): """ :rtype: list(str) :return: List of arguments for the step """ raise NotImplemented() def main_class(self): """ :rtype: str :return: The main class name """ raise NotImplemented() class JarStep(Step): """ Custom jar step """ def __init__(self, name, jar, main_class=None, action_on_failure='TERMINATE_JOB_FLOW', step_args=None): """ A elastic mapreduce step that executes a jar :type name: str :param name: The name of the step :type jar: str :param jar: S3 URI to the Jar file :type main_class: str :param main_class: The class to execute in the jar :type action_on_failure: str :param action_on_failure: An action, defined in the EMR docs to take on failure. :type step_args: list(str) :param step_args: A list of arguments to pass to the step """ self.name = name self._jar = jar self._main_class = main_class self.action_on_failure = action_on_failure if isinstance(step_args, basestring): step_args = [step_args] self.step_args = step_args def jar(self): return self._jar def args(self): args = [] if self.step_args: args.extend(self.step_args) return args def main_class(self): return self._main_class class StreamingStep(Step): """ Hadoop streaming step """ def __init__(self, name, mapper, reducer=None, combiner=None, action_on_failure='TERMINATE_JOB_FLOW', cache_files=None, cache_archives=None, step_args=None, input=None, output=None, jar='/home/hadoop/contrib/streaming/hadoop-streaming.jar'): """ A hadoop streaming elastic mapreduce step :type name: str :param name: The name of the step :type mapper: str :param mapper: The mapper URI :type reducer: str :param reducer: The reducer URI :type combiner: str :param combiner: The combiner URI. Only works for Hadoop 0.20 and later! :type action_on_failure: str :param action_on_failure: An action, defined in the EMR docs to take on failure. :type cache_files: list(str) :param cache_files: A list of cache files to be bundled with the job :type cache_archives: list(str) :param cache_archives: A list of jar archives to be bundled with the job :type step_args: list(str) :param step_args: A list of arguments to pass to the step :type input: str or a list of str :param input: The input uri :type output: str :param output: The output uri :type jar: str :param jar: The hadoop streaming jar. This can be either a local path on the master node, or an s3:// URI. """ self.name = name self.mapper = mapper self.reducer = reducer self.combiner = combiner self.action_on_failure = action_on_failure self.cache_files = cache_files self.cache_archives = cache_archives self.input = input self.output = output self._jar = jar if isinstance(step_args, basestring): step_args = [step_args] self.step_args = step_args def jar(self): return self._jar def main_class(self): return None def args(self): args = [] # put extra args BEFORE -mapper and -reducer so that e.g. -libjar # will work if self.step_args: args.extend(self.step_args) args.extend(['-mapper', self.mapper]) if self.combiner: args.extend(['-combiner', self.combiner]) if self.reducer: args.extend(['-reducer', self.reducer]) else: args.extend(['-jobconf', 'mapred.reduce.tasks=0']) if self.input: if isinstance(self.input, list): for input in self.input: args.extend(('-input', input)) else: args.extend(('-input', self.input)) if self.output: args.extend(('-output', self.output)) if self.cache_files: for cache_file in self.cache_files: args.extend(('-cacheFile', cache_file)) if self.cache_archives: for cache_archive in self.cache_archives: args.extend(('-cacheArchive', cache_archive)) return args def __repr__(self): 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)' % ( self.__class__.__module__, self.__class__.__name__, self.name, self.mapper, self.reducer, self.action_on_failure, self.cache_files, self.cache_archives, self.step_args, self.input, self.output, self._jar) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/exception.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Exception classes - Subclassing allows you to check for specific errors """ import base64 import xml.sax from boto import handler from boto.resultset import ResultSet class BotoClientError(StandardError): """ General Boto Client error (error accessing AWS) """ def __init__(self, reason, *args): StandardError.__init__(self, reason, *args) self.reason = reason def __repr__(self): return 'BotoClientError: %s' % self.reason def __str__(self): return 'BotoClientError: %s' % self.reason class SDBPersistenceError(StandardError): pass class StoragePermissionsError(BotoClientError): """ Permissions error when accessing a bucket or key on a storage service. """ pass class S3PermissionsError(StoragePermissionsError): """ Permissions error when accessing a bucket or key on S3. """ pass class GSPermissionsError(StoragePermissionsError): """ Permissions error when accessing a bucket or key on GS. """ pass class BotoServerError(StandardError): def __init__(self, status, reason, body=None, *args): StandardError.__init__(self, status, reason, body, *args) self.status = status self.reason = reason self.body = body or '' self.request_id = None self.error_code = None self.error_message = None self.box_usage = None # Attempt to parse the error response. If body isn't present, # then just ignore the error response. if self.body: try: h = handler.XmlHandler(self, self) xml.sax.parseString(self.body, h) except xml.sax.SAXParseException, pe: # Remove unparsable message body so we don't include garbage # in exception. But first, save self.body in self.error_message # because occasionally we get error messages from Eucalyptus # that are just text strings that we want to preserve. self.error_message = self.body self.body = None def __getattr__(self, name): if name == 'message': return self.error_message if name == 'code': return self.error_code raise AttributeError def __repr__(self): return '%s: %s %s\n%s' % (self.__class__.__name__, self.status, self.reason, self.body) def __str__(self): return '%s: %s %s\n%s' % (self.__class__.__name__, self.status, self.reason, self.body) def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name in ('RequestId', 'RequestID'): self.request_id = value elif name == 'Code': self.error_code = value elif name == 'Message': self.error_message = value elif name == 'BoxUsage': self.box_usage = value return None def _cleanupParsedProperties(self): self.request_id = None self.error_code = None self.error_message = None self.box_usage = None class ConsoleOutput: def __init__(self, parent=None): self.parent = parent self.instance_id = None self.timestamp = None self.comment = None self.output = None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'instanceId': self.instance_id = value elif name == 'output': self.output = base64.b64decode(value) else: setattr(self, name, value) class StorageCreateError(BotoServerError): """ Error creating a bucket or key on a storage service. """ def __init__(self, status, reason, body=None): self.bucket = None BotoServerError.__init__(self, status, reason, body) def endElement(self, name, value, connection): if name == 'BucketName': self.bucket = value else: return BotoServerError.endElement(self, name, value, connection) class S3CreateError(StorageCreateError): """ Error creating a bucket or key on S3. """ pass class GSCreateError(StorageCreateError): """ Error creating a bucket or key on GS. """ pass class StorageCopyError(BotoServerError): """ Error copying a key on a storage service. """ pass class S3CopyError(StorageCopyError): """ Error copying a key on S3. """ pass class GSCopyError(StorageCopyError): """ Error copying a key on GS. """ pass class SQSError(BotoServerError): """ General Error on Simple Queue Service. """ def __init__(self, status, reason, body=None): self.detail = None self.type = None BotoServerError.__init__(self, status, reason, body) def startElement(self, name, attrs, connection): return BotoServerError.startElement(self, name, attrs, connection) def endElement(self, name, value, connection): if name == 'Detail': self.detail = value elif name == 'Type': self.type = value else: return BotoServerError.endElement(self, name, value, connection) def _cleanupParsedProperties(self): BotoServerError._cleanupParsedProperties(self) for p in ('detail', 'type'): setattr(self, p, None) class SQSDecodeError(BotoClientError): """ Error when decoding an SQS message. """ def __init__(self, reason, message): BotoClientError.__init__(self, reason, message) self.message = message def __repr__(self): return 'SQSDecodeError: %s' % self.reason def __str__(self): return 'SQSDecodeError: %s' % self.reason class StorageResponseError(BotoServerError): """ Error in response from a storage service. """ def __init__(self, status, reason, body=None): self.resource = None BotoServerError.__init__(self, status, reason, body) def startElement(self, name, attrs, connection): return BotoServerError.startElement(self, name, attrs, connection) def endElement(self, name, value, connection): if name == 'Resource': self.resource = value else: return BotoServerError.endElement(self, name, value, connection) def _cleanupParsedProperties(self): BotoServerError._cleanupParsedProperties(self) for p in ('resource'): setattr(self, p, None) class S3ResponseError(StorageResponseError): """ Error in response from S3. """ pass class GSResponseError(StorageResponseError): """ Error in response from GS. """ pass class EC2ResponseError(BotoServerError): """ Error in response from EC2. """ def __init__(self, status, reason, body=None): self.errors = None self._errorResultSet = [] BotoServerError.__init__(self, status, reason, body) self.errors = [ (e.error_code, e.error_message) \ for e in self._errorResultSet ] if len(self.errors): self.error_code, self.error_message = self.errors[0] def startElement(self, name, attrs, connection): if name == 'Errors': self._errorResultSet = ResultSet([('Error', _EC2Error)]) return self._errorResultSet else: return None def endElement(self, name, value, connection): if name == 'RequestID': self.request_id = value else: return None # don't call subclass here def _cleanupParsedProperties(self): BotoServerError._cleanupParsedProperties(self) self._errorResultSet = [] for p in ('errors'): setattr(self, p, None) class EmrResponseError(BotoServerError): """ Error in response from EMR """ pass class _EC2Error: def __init__(self, connection=None): self.connection = connection self.error_code = None self.error_message = None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'Code': self.error_code = value elif name == 'Message': self.error_message = value else: return None class SDBResponseError(BotoServerError): """ Error in responses from SDB. """ pass class AWSConnectionError(BotoClientError): """ General error connecting to Amazon Web Services. """ pass class StorageDataError(BotoClientError): """ Error receiving data from a storage service. """ pass class S3DataError(StorageDataError): """ Error receiving data from S3. """ pass class GSDataError(StorageDataError): """ Error receiving data from GS. """ pass class FPSResponseError(BotoServerError): pass class InvalidUriError(Exception): """Exception raised when URI is invalid.""" def __init__(self, message): Exception.__init__(self, message) self.message = message class InvalidAclError(Exception): """Exception raised when ACL XML is invalid.""" def __init__(self, message): Exception.__init__(self, message) self.message = message class NoAuthHandlerFound(Exception): """Is raised when no auth handlers were found ready to authenticate.""" pass class TooManyAuthHandlerReadyToAuthenticate(Exception): """Is raised when there are more than one auth handler ready. In normal situation there should only be one auth handler that is ready to authenticate. In case where more than one auth handler is ready to authenticate, we raise this exception, to prevent unpredictable behavior when multiple auth handlers can handle a particular case and the one chosen depends on the order they were checked. """ pass # Enum class for resumable upload failure disposition. class ResumableTransferDisposition(object): # START_OVER means an attempt to resume an existing transfer failed, # and a new resumable upload should be attempted (without delay). START_OVER = 'START_OVER' # WAIT_BEFORE_RETRY means the resumable transfer failed but that it can # be retried after a time delay within the current process. WAIT_BEFORE_RETRY = 'WAIT_BEFORE_RETRY' # ABORT_CUR_PROCESS means the resumable transfer failed and that # delaying/retrying within the current process will not help. If # resumable transfer included a state tracker file the upload can be # retried again later, in another process (e.g., a later run of gsutil). ABORT_CUR_PROCESS = 'ABORT_CUR_PROCESS' # ABORT means the resumable transfer failed in a way that it does not # make sense to continue in the current process, and further that the # current tracker ID should not be preserved (in a tracker file if one # was specified at resumable upload start time). If the user tries again # later (e.g., a separate run of gsutil) it will get a new resumable # upload ID. ABORT = 'ABORT' class ResumableUploadException(Exception): """ Exception raised for various resumable upload problems. self.disposition is of type ResumableTransferDisposition. """ def __init__(self, message, disposition): Exception.__init__(self, message, disposition) self.message = message self.disposition = disposition def __repr__(self): return 'ResumableUploadException("%s", %s)' % ( self.message, self.disposition) class ResumableDownloadException(Exception): """ Exception raised for various resumable download problems. self.disposition is of type ResumableTransferDisposition. """ def __init__(self, message, disposition): Exception.__init__(self, message, disposition) self.message = message self.disposition = disposition def __repr__(self): return 'ResumableDownloadException("%s", %s)' % ( self.message, self.disposition) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/file/__init__.py ================================================ # Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import boto from connection import FileConnection as Connection from key import Key from bucket import Bucket __all__ = ['Connection', 'Key', 'Bucket'] ================================================ FILE: deploy/third_party/boto-2.1.1/boto/file/bucket.py ================================================ # Copyright 2010 Google Inc. # Copyright (c) 2011, Nexenta Systems Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # File representation of bucket, for use with "file://" URIs. import os from key import Key from boto.file.simpleresultset import SimpleResultSet from boto.s3.bucketlistresultset import BucketListResultSet class Bucket(object): def __init__(self, name, contained_key): """Instantiate an anonymous file-based Bucket around a single key. """ self.name = name self.contained_key = contained_key def __iter__(self): return iter(BucketListResultSet(self)) def __str__(self): return 'anonymous bucket for file://' + self.contained_key def delete_key(self, key_name, headers=None, version_id=None, mfa_token=None): """ Deletes a key from the bucket. :type key_name: string :param key_name: The key name to delete :type version_id: string :param version_id: Unused in this subclass. :type mfa_token: tuple or list of strings :param mfa_token: Unused in this subclass. """ os.remove(key_name) def get_all_keys(self, headers=None, **params): """ This method returns the single key around which this anonymous Bucket was instantiated. :rtype: SimpleResultSet :return: The result from file system listing the keys requested """ key = Key(self.name, self.contained_key) return SimpleResultSet([key]) def get_key(self, key_name, headers=None, version_id=None, key_type=Key.KEY_REGULAR_FILE): """ Check to see if a particular key exists within the bucket. Returns: An instance of a Key object or None :type key_name: string :param key_name: The name of the key to retrieve :type version_id: string :param version_id: Unused in this subclass. :type stream_type: integer :param stream_type: Type of the Key - Regular File or input/output Stream :rtype: :class:`boto.file.key.Key` :returns: A Key object from this bucket. """ if key_name == '-': return Key(self.name, '-', key_type=Key.KEY_STREAM_READABLE) else: fp = open(key_name, 'rb') return Key(self.name, key_name, fp) def new_key(self, key_name=None, key_type=Key.KEY_REGULAR_FILE): """ Creates a new key :type key_name: string :param key_name: The name of the key to create :rtype: :class:`boto.file.key.Key` :returns: An instance of the newly created key object """ if key_name == '-': return Key(self.name, '-', key_type=Key.KEY_STREAM_WRITABLE) else: dir_name = os.path.dirname(key_name) if dir_name and not os.path.exists(dir_name): os.makedirs(dir_name) fp = open(key_name, 'wb') return Key(self.name, key_name, fp) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/file/connection.py ================================================ # Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # File representation of connection, for use with "file://" URIs. from bucket import Bucket class FileConnection(object): def __init__(self, file_storage_uri): # FileConnections are per-file storage URI. self.file_storage_uri = file_storage_uri def get_bucket(self, bucket_name, validate=True, headers=None): return Bucket(bucket_name, self.file_storage_uri.object_name) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/file/key.py ================================================ # Copyright 2010 Google Inc. # Copyright (c) 2011, Nexenta Systems Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # File representation of key, for use with "file://" URIs. import os, shutil, StringIO import sys class Key(object): KEY_STREAM_READABLE = 0x01 KEY_STREAM_WRITABLE = 0x02 KEY_STREAM = (KEY_STREAM_READABLE | KEY_STREAM_WRITABLE) KEY_REGULAR_FILE = 0x00 def __init__(self, bucket, name, fp=None, key_type=KEY_REGULAR_FILE): self.bucket = bucket self.full_path = name if name == '-': self.name = None else: self.name = name self.key_type = key_type if key_type == self.KEY_STREAM_READABLE: self.fp = sys.stdin self.full_path = '' elif key_type == self.KEY_STREAM_WRITABLE: self.fp = sys.stdout self.full_path = '' else: self.fp = fp def __str__(self): return 'file://' + self.full_path def get_file(self, fp, headers=None, cb=None, num_cb=10, torrent=False): """ Retrieves a file from a Key :type fp: file :param fp: File pointer to put the data into :type headers: string :param: ignored in this subclass. :type cb: function :param cb: ignored in this subclass. :type cb: int :param num_cb: ignored in this subclass. """ if self.key_type & self.KEY_STREAM_READABLE: raise BotoClientError('Stream is not Readable') elif self.key_type & self.KEY_STREAM_WRITABLE: key_file = self.fp else: key_file = open(self.full_path, 'rb') shutil.copyfileobj(key_file, fp) def set_contents_from_file(self, fp, headers=None, replace=True, cb=None, num_cb=10, policy=None, md5=None): """ Store an object in a file using the name of the Key object as the key in file URI and the contents of the file pointed to by 'fp' as the contents. :type fp: file :param fp: the file whose contents to upload :type headers: dict :param headers: ignored in this subclass. :type replace: bool :param replace: If this parameter is False, the method will first check to see if an object exists in the bucket with the same key. If it does, it won't overwrite it. The default value is True which will overwrite the object. :type cb: function :param cb: ignored in this subclass. :type cb: int :param num_cb: ignored in this subclass. :type policy: :class:`boto.s3.acl.CannedACLStrings` :param policy: ignored in this subclass. :type md5: A tuple containing the hexdigest version of the MD5 checksum of the file as the first element and the Base64-encoded version of the plain checksum as the second element. This is the same format returned by the compute_md5 method. :param md5: ignored in this subclass. """ if self.key_type & self.KEY_STREAM_WRITABLE: raise BotoClientError('Stream is not writable') elif self.key_type & self.KEY_STREAM_READABLE: key_file = self.fp else: if not replace and os.path.exists(self.full_path): return key_file = open(self.full_path, 'wb') shutil.copyfileobj(fp, key_file) key_file.close() def get_contents_as_string(self, headers=None, cb=None, num_cb=10, torrent=False): """ Retrieve file data from the Key, and return contents as a string. :type headers: dict :param headers: ignored in this subclass. :type cb: function :param cb: ignored in this subclass. :type cb: int :param num_cb: ignored in this subclass. :type cb: int :param num_cb: ignored in this subclass. :type torrent: bool :param torrent: ignored in this subclass. :rtype: string :returns: The contents of the file as a string """ fp = StringIO.StringIO() self.get_contents_to_file(fp) return fp.getvalue() def is_stream(self): return (self.key_type & self.KEY_STREAM) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/file/simpleresultset.py ================================================ # Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class SimpleResultSet(list): """ ResultSet facade built from a simple list, rather than via XML parsing. """ def __init__(self, input_list): for x in input_list: self.append(x) self.is_truncated = False ================================================ FILE: deploy/third_party/boto-2.1.1/boto/fps/__init__.py ================================================ # Copyright (c) 2008, Chris Moyer http://coredumped.org # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # ================================================ FILE: deploy/third_party/boto-2.1.1/boto/fps/connection.py ================================================ # Copyright (c) 2008 Chris Moyer http://coredumped.org/ # Copyringt (c) 2010 Jason R. Coombs http://www.jaraco.com/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import base64 import hmac import hashlib import urllib import xml.sax import uuid import boto import boto.utils from boto import handler from boto.connection import AWSQueryConnection from boto.resultset import ResultSet from boto.exception import FPSResponseError class FPSConnection(AWSQueryConnection): APIVersion = '2007-01-08' def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, host='fps.sandbox.amazonaws.com', debug=0, https_connection_factory=None, path="/"): AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, host, debug, https_connection_factory, path) def _required_auth_capability(self): return ['fps'] def install_payment_instruction(self, instruction, token_type="Unrestricted", transaction_id=None): """ InstallPaymentInstruction instruction: The PaymentInstruction to send, for example: MyRole=='Caller' orSay 'Roles do not match'; token_type: Defaults to "Unrestricted" transaction_id: Defaults to a new ID """ if(transaction_id == None): transaction_id = uuid.uuid4() params = {} params['PaymentInstruction'] = instruction params['TokenType'] = token_type params['CallerReference'] = transaction_id response = self.make_request("InstallPaymentInstruction", params) return response def install_caller_instruction(self, token_type="Unrestricted", transaction_id=None): """ Set us up as a caller This will install a new caller_token into the FPS section. This should really only be called to regenerate the caller token. """ response = self.install_payment_instruction("MyRole=='Caller';", token_type=token_type, transaction_id=transaction_id) body = response.read() if(response.status == 200): rs = ResultSet() h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) caller_token = rs.TokenId try: boto.config.save_system_option("FPS", "caller_token", caller_token) except(IOError): boto.config.save_user_option("FPS", "caller_token", caller_token) return caller_token else: raise FPSResponseError(response.status, response.reason, body) def install_recipient_instruction(self, token_type="Unrestricted", transaction_id=None): """ Set us up as a Recipient This will install a new caller_token into the FPS section. This should really only be called to regenerate the recipient token. """ response = self.install_payment_instruction("MyRole=='Recipient';", token_type=token_type, transaction_id=transaction_id) body = response.read() if(response.status == 200): rs = ResultSet() h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) recipient_token = rs.TokenId try: boto.config.save_system_option("FPS", "recipient_token", recipient_token) except(IOError): boto.config.save_user_option("FPS", "recipient_token", recipient_token) return recipient_token else: raise FPSResponseError(response.status, response.reason, body) def make_marketplace_registration_url(self, returnURL, pipelineName, maxFixedFee=0.0, maxVariableFee=0.0, recipientPaysFee=True, **params): """ Generate the URL with the signature required for signing up a recipient """ # use the sandbox authorization endpoint if we're using the # sandbox for API calls. endpoint_host = 'authorize.payments.amazon.com' if 'sandbox' in self.host: endpoint_host = 'authorize.payments-sandbox.amazon.com' base = "/cobranded-ui/actions/start" params['callerKey'] = str(self.aws_access_key_id) params['returnURL'] = str(returnURL) params['pipelineName'] = str(pipelineName) params['maxFixedFee'] = str(maxFixedFee) params['maxVariableFee'] = str(maxVariableFee) params['recipientPaysFee'] = str(recipientPaysFee) params["signatureMethod"] = 'HmacSHA256' params["signatureVersion"] = '2' if(not params.has_key('callerReference')): params['callerReference'] = str(uuid.uuid4()) parts = '' for k in sorted(params.keys()): parts += "&%s=%s" % (k, urllib.quote(params[k], '~')) canonical = '\n'.join(['GET', str(endpoint_host).lower(), base, parts[1:]]) signature = self._auth_handler.sign_string(canonical) params["signature"] = signature urlsuffix = '' for k in sorted(params.keys()): urlsuffix += "&%s=%s" % (k, urllib.quote(params[k], '~')) urlsuffix = urlsuffix[1:] # strip the first & fmt = "https://%(endpoint_host)s%(base)s?%(urlsuffix)s" final = fmt % vars() return final def make_url(self, returnURL, paymentReason, pipelineName, transactionAmount, **params): """ Generate the URL with the signature required for a transaction """ # use the sandbox authorization endpoint if we're using the # sandbox for API calls. endpoint_host = 'authorize.payments.amazon.com' if 'sandbox' in self.host: endpoint_host = 'authorize.payments-sandbox.amazon.com' base = "/cobranded-ui/actions/start" params['callerKey'] = str(self.aws_access_key_id) params['returnURL'] = str(returnURL) params['paymentReason'] = str(paymentReason) params['pipelineName'] = pipelineName params['transactionAmount'] = transactionAmount params["signatureMethod"] = 'HmacSHA256' params["signatureVersion"] = '2' if(not params.has_key('callerReference')): params['callerReference'] = str(uuid.uuid4()) parts = '' for k in sorted(params.keys()): parts += "&%s=%s" % (k, urllib.quote(params[k], '~')) canonical = '\n'.join(['GET', str(endpoint_host).lower(), base, parts[1:]]) signature = self._auth_handler.sign_string(canonical) params["signature"] = signature urlsuffix = '' for k in sorted(params.keys()): urlsuffix += "&%s=%s" % (k, urllib.quote(params[k], '~')) urlsuffix = urlsuffix[1:] # strip the first & fmt = "https://%(endpoint_host)s%(base)s?%(urlsuffix)s" final = fmt % vars() return final def pay(self, transactionAmount, senderTokenId, recipientTokenId=None, callerTokenId=None, chargeFeeTo="Recipient", callerReference=None, senderReference=None, recipientReference=None, senderDescription=None, recipientDescription=None, callerDescription=None, metadata=None, transactionDate=None, reserve=False): """ Make a payment transaction. You must specify the amount. This can also perform a Reserve request if 'reserve' is set to True. """ params = {} params['SenderTokenId'] = senderTokenId # this is for 2008-09-17 specification params['TransactionAmount.Amount'] = str(transactionAmount) params['TransactionAmount.CurrencyCode'] = "USD" #params['TransactionAmount'] = str(transactionAmount) params['ChargeFeeTo'] = chargeFeeTo params['RecipientTokenId'] = ( recipientTokenId if recipientTokenId is not None else boto.config.get("FPS", "recipient_token") ) params['CallerTokenId'] = ( callerTokenId if callerTokenId is not None else boto.config.get("FPS", "caller_token") ) if(transactionDate != None): params['TransactionDate'] = transactionDate if(senderReference != None): params['SenderReference'] = senderReference if(recipientReference != None): params['RecipientReference'] = recipientReference if(senderDescription != None): params['SenderDescription'] = senderDescription if(recipientDescription != None): params['RecipientDescription'] = recipientDescription if(callerDescription != None): params['CallerDescription'] = callerDescription if(metadata != None): params['MetaData'] = metadata if(callerReference == None): callerReference = uuid.uuid4() params['CallerReference'] = callerReference if reserve: response = self.make_request("Reserve", params) else: response = self.make_request("Pay", params) body = response.read() if(response.status == 200): rs = ResultSet() h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs else: raise FPSResponseError(response.status, response.reason, body) def get_transaction_status(self, transactionId): """ Returns the status of a given transaction. """ params = {} params['TransactionId'] = transactionId response = self.make_request("GetTransactionStatus", params) body = response.read() if(response.status == 200): rs = ResultSet() h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs else: raise FPSResponseError(response.status, response.reason, body) def cancel(self, transactionId, description=None): """ Cancels a reserved or pending transaction. """ params = {} params['transactionId'] = transactionId if(description != None): params['description'] = description response = self.make_request("Cancel", params) body = response.read() if(response.status == 200): rs = ResultSet() h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs else: raise FPSResponseError(response.status, response.reason, body) def settle(self, reserveTransactionId, transactionAmount=None): """ Charges for a reserved payment. """ params = {} params['ReserveTransactionId'] = reserveTransactionId if(transactionAmount != None): params['TransactionAmount'] = transactionAmount response = self.make_request("Settle", params) body = response.read() if(response.status == 200): rs = ResultSet() h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs else: raise FPSResponseError(response.status, response.reason, body) def refund(self, callerReference, transactionId, refundAmount=None, callerDescription=None): """ Refund a transaction. This refunds the full amount by default unless 'refundAmount' is specified. """ params = {} params['CallerReference'] = callerReference params['TransactionId'] = transactionId if(refundAmount != None): params['RefundAmount'] = refundAmount if(callerDescription != None): params['CallerDescription'] = callerDescription response = self.make_request("Refund", params) body = response.read() if(response.status == 200): rs = ResultSet() h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs else: raise FPSResponseError(response.status, response.reason, body) def get_recipient_verification_status(self, recipientTokenId): """ Test that the intended recipient has a verified Amazon Payments account. """ params ={} params['RecipientTokenId'] = recipientTokenId response = self.make_request("GetRecipientVerificationStatus", params) body = response.read() if(response.status == 200): rs = ResultSet() h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs else: raise FPSResponseError(response.status, response.reason, body) def get_token_by_caller_reference(self, callerReference): """ Returns details about the token specified by 'CallerReference'. """ params ={} params['CallerReference'] = callerReference response = self.make_request("GetTokenByCaller", params) body = response.read() if(response.status == 200): rs = ResultSet() h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs else: raise FPSResponseError(response.status, response.reason, body) def get_token_by_caller_token(self, tokenId): """ Returns details about the token specified by 'TokenId'. """ params ={} params['TokenId'] = tokenId response = self.make_request("GetTokenByCaller", params) body = response.read() if(response.status == 200): rs = ResultSet() h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs else: raise FPSResponseError(response.status, response.reason, body) def verify_signature(self, end_point_url, http_parameters): params = dict( UrlEndPoint = end_point_url, HttpParameters = http_parameters, ) response = self.make_request("VerifySignature", params) body = response.read() if(response.status != 200): raise FPSResponseError(response.status, response.reason, body) rs = ResultSet() h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs ================================================ FILE: deploy/third_party/boto-2.1.1/boto/gs/__init__.py ================================================ # Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # ================================================ FILE: deploy/third_party/boto-2.1.1/boto/gs/acl.py ================================================ # Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.gs.user import User from boto.exception import InvalidAclError ACCESS_CONTROL_LIST = 'AccessControlList' ALL_AUTHENTICATED_USERS = 'AllAuthenticatedUsers' ALL_USERS = 'AllUsers' DOMAIN = 'Domain' EMAIL_ADDRESS = 'EmailAddress' ENTRY = 'Entry' ENTRIES = 'Entries' GROUP_BY_DOMAIN = 'GroupByDomain' GROUP_BY_EMAIL = 'GroupByEmail' GROUP_BY_ID = 'GroupById' ID = 'ID' NAME = 'Name' OWNER = 'Owner' PERMISSION = 'Permission' SCOPE = 'Scope' TYPE = 'type' USER_BY_EMAIL = 'UserByEmail' USER_BY_ID = 'UserById' CannedACLStrings = ['private', 'public-read', 'project-private', 'public-read-write', 'authenticated-read', 'bucket-owner-read', 'bucket-owner-full-control'] SupportedPermissions = ['READ', 'WRITE', 'FULL_CONTROL'] class ACL: def __init__(self, parent=None): self.parent = parent self.entries = [] @property def acl(self): return self def __repr__(self): # Owner is optional in GS ACLs. if hasattr(self, 'owner'): entries_repr = [''] else: entries_repr = ['Owner:%s' % self.owner.__repr__()] acl_entries = self.entries if acl_entries: for e in acl_entries.entry_list: entries_repr.append(e.__repr__()) return '<%s>' % ', '.join(entries_repr) # Method with same signature as boto.s3.acl.ACL.add_email_grant(), to allow # polymorphic treatment at application layer. def add_email_grant(self, permission, email_address): entry = Entry(type=USER_BY_EMAIL, email_address=email_address, permission=permission) self.entries.entry_list.append(entry) # Method with same signature as boto.s3.acl.ACL.add_user_grant(), to allow # polymorphic treatment at application layer. def add_user_grant(self, permission, user_id): entry = Entry(permission=permission, type=USER_BY_ID, id=user_id) self.entries.entry_list.append(entry) def add_group_email_grant(self, permission, email_address): entry = Entry(type=GROUP_BY_EMAIL, email_address=email_address, permission=permission) self.entries.entry_list.append(entry) def add_group_grant(self, permission, group_id): entry = Entry(type=GROUP_BY_ID, id=group_id, permission=permission) self.entries.entry_list.append(entry) def startElement(self, name, attrs, connection): if name == OWNER: self.owner = User(self) return self.owner elif name == ENTRIES: self.entries = Entries(self) return self.entries else: return None def endElement(self, name, value, connection): if name == OWNER: pass elif name == ENTRIES: pass else: setattr(self, name, value) def to_xml(self): s = '<%s>' % ACCESS_CONTROL_LIST # Owner is optional in GS ACLs. if hasattr(self, 'owner'): s += self.owner.to_xml() acl_entries = self.entries if acl_entries: s += acl_entries.to_xml() s += '' % ACCESS_CONTROL_LIST return s class Entries: def __init__(self, parent=None): self.parent = parent # Entries is the class that represents the same-named XML # element. entry_list is the list within this class that holds the data. self.entry_list = [] def __repr__(self): entries_repr = [] for e in self.entry_list: entries_repr.append(e.__repr__()) return '' % ', '.join(entries_repr) def startElement(self, name, attrs, connection): if name == ENTRY: entry = Entry(self) self.entry_list.append(entry) return entry else: return None def endElement(self, name, value, connection): if name == ENTRY: pass else: setattr(self, name, value) def to_xml(self): s = '<%s>' % ENTRIES for entry in self.entry_list: s += entry.to_xml() s += '' % ENTRIES return s # Class that represents a single (Scope, Permission) entry in an ACL. class Entry: def __init__(self, scope=None, type=None, id=None, name=None, email_address=None, domain=None, permission=None): if not scope: scope = Scope(self, type, id, name, email_address, domain) self.scope = scope self.permission = permission def __repr__(self): return '<%s: %s>' % (self.scope.__repr__(), self.permission.__repr__()) def startElement(self, name, attrs, connection): if name == SCOPE: if not TYPE in attrs: raise InvalidAclError('Missing "%s" in "%s" part of ACL' % (TYPE, SCOPE)) self.scope = Scope(self, attrs[TYPE]) return self.scope elif name == PERMISSION: pass else: return None def endElement(self, name, value, connection): if name == SCOPE: pass elif name == PERMISSION: value = value.strip() if not value in SupportedPermissions: raise InvalidAclError('Invalid Permission "%s"' % value) self.permission = value else: setattr(self, name, value) def to_xml(self): s = '<%s>' % ENTRY s += self.scope.to_xml() s += '<%s>%s' % (PERMISSION, self.permission, PERMISSION) s += '' % ENTRY return s class Scope: # Map from Scope type to list of allowed sub-elems. ALLOWED_SCOPE_TYPE_SUB_ELEMS = { ALL_AUTHENTICATED_USERS : [], ALL_USERS : [], GROUP_BY_DOMAIN : [DOMAIN], GROUP_BY_EMAIL : [EMAIL_ADDRESS, NAME], GROUP_BY_ID : [ID, NAME], USER_BY_EMAIL : [EMAIL_ADDRESS, NAME], USER_BY_ID : [ID, NAME] } def __init__(self, parent, type=None, id=None, name=None, email_address=None, domain=None): self.parent = parent self.type = type self.name = name self.id = id self.domain = domain self.email_address = email_address if not self.ALLOWED_SCOPE_TYPE_SUB_ELEMS.has_key(self.type): raise InvalidAclError('Invalid %s %s "%s" ' % (SCOPE, TYPE, self.type)) def __repr__(self): named_entity = None if self.id: named_entity = self.id elif self.email_address: named_entity = self.email_address elif self.domain: named_entity = self.domain if named_entity: return '<%s: %s>' % (self.type, named_entity) else: return '<%s>' % self.type def startElement(self, name, attrs, connection): if not name in self.ALLOWED_SCOPE_TYPE_SUB_ELEMS[self.type]: raise InvalidAclError('Element "%s" not allowed in %s %s "%s" ' % (name, SCOPE, TYPE, self.type)) return None def endElement(self, name, value, connection): value = value.strip() if name == DOMAIN: self.domain = value elif name == EMAIL_ADDRESS: self.email_address = value elif name == ID: self.id = value elif name == NAME: self.name = value else: setattr(self, name, value) def to_xml(self): s = '<%s type="%s">' % (SCOPE, self.type) if self.type == ALL_AUTHENTICATED_USERS or self.type == ALL_USERS: pass elif self.type == GROUP_BY_DOMAIN: s += '<%s>%s' % (DOMAIN, self.domain, DOMAIN) elif self.type == GROUP_BY_EMAIL or self.type == USER_BY_EMAIL: s += '<%s>%s' % (EMAIL_ADDRESS, self.email_address, EMAIL_ADDRESS) if self.name: s += '<%s>%s' % (NAME, self.name, NAME) elif self.type == GROUP_BY_ID or self.type == USER_BY_ID: s += '<%s>%s' % (ID, self.id, ID) if self.name: s += '<%s>%s' % (NAME, self.name, NAME) else: raise InvalidAclError('Invalid scope type "%s" ', self.type) s += '' % SCOPE return s ================================================ FILE: deploy/third_party/boto-2.1.1/boto/gs/bucket.py ================================================ # Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import boto from boto import handler from boto.exception import InvalidAclError from boto.gs.acl import ACL, CannedACLStrings from boto.gs.acl import SupportedPermissions as GSPermissions from boto.gs.key import Key as GSKey from boto.s3.acl import Policy from boto.s3.bucket import Bucket as S3Bucket import xml.sax class Bucket(S3Bucket): def __init__(self, connection=None, name=None, key_class=GSKey): super(Bucket, self).__init__(connection, name, key_class) def set_acl(self, acl_or_str, key_name='', headers=None, version_id=None): if isinstance(acl_or_str, Policy): raise InvalidAclError('Attempt to set S3 Policy on GS ACL') elif isinstance(acl_or_str, ACL): self.set_xml_acl(acl_or_str.to_xml(), key_name, headers=headers) else: self.set_canned_acl(acl_or_str, key_name, headers=headers) def get_acl(self, key_name='', headers=None, version_id=None): response = self.connection.make_request('GET', self.name, key_name, query_args='acl', headers=headers) body = response.read() if response.status == 200: acl = ACL(self) h = handler.XmlHandler(acl, self) xml.sax.parseString(body, h) return acl else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def set_canned_acl(self, acl_str, key_name='', headers=None, version_id=None): assert acl_str in CannedACLStrings if headers: headers[self.connection.provider.acl_header] = acl_str else: headers={self.connection.provider.acl_header: acl_str} query_args='acl' if version_id: query_args += '&versionId=%s' % version_id response = self.connection.make_request('PUT', self.name, key_name, headers=headers, query_args=query_args) body = response.read() if response.status != 200: raise self.connection.provider.storage_response_error( response.status, response.reason, body) # Method with same signature as boto.s3.bucket.Bucket.add_email_grant(), # to allow polymorphic treatment at application layer. def add_email_grant(self, permission, email_address, recursive=False, headers=None): """ Convenience method that provides a quick way to add an email grant to a bucket. This method retrieves the current ACL, creates a new grant based on the parameters passed in, adds that grant to the ACL and then PUT's the new ACL back to GS. :type permission: string :param permission: The permission being granted. Should be one of: (READ, WRITE, FULL_CONTROL). :type email_address: string :param email_address: The email address associated with the GS account your are granting the permission to. :type recursive: boolean :param recursive: A boolean value to controls whether the call will apply the grant to all keys within the bucket or not. The default value is False. By passing a True value, the call will iterate through all keys in the bucket and apply the same grant to each key. CAUTION: If you have a lot of keys, this could take a long time! """ if permission not in GSPermissions: raise self.connection.provider.storage_permissions_error( 'Unknown Permission: %s' % permission) acl = self.get_acl(headers=headers) acl.add_email_grant(permission, email_address) self.set_acl(acl, headers=headers) if recursive: for key in self: key.add_email_grant(permission, email_address, headers=headers) # Method with same signature as boto.s3.bucket.Bucket.add_user_grant(), # to allow polymorphic treatment at application layer. def add_user_grant(self, permission, user_id, recursive=False, headers=None): """ Convenience method that provides a quick way to add a canonical user grant to a bucket. This method retrieves the current ACL, creates a new grant based on the parameters passed in, adds that grant to the ACL and then PUTs the new ACL back to GS. :type permission: string :param permission: The permission being granted. Should be one of: (READ|WRITE|FULL_CONTROL) :type user_id: string :param user_id: The canonical user id associated with the GS account you are granting the permission to. :type recursive: bool :param recursive: A boolean value to controls whether the call will apply the grant to all keys within the bucket or not. The default value is False. By passing a True value, the call will iterate through all keys in the bucket and apply the same grant to each key. CAUTION: If you have a lot of keys, this could take a long time! """ if permission not in GSPermissions: raise self.connection.provider.storage_permissions_error( 'Unknown Permission: %s' % permission) acl = self.get_acl(headers=headers) acl.add_user_grant(permission, user_id) self.set_acl(acl, headers=headers) if recursive: for key in self: key.add_user_grant(permission, user_id, headers=headers) def add_group_email_grant(self, permission, email_address, recursive=False, headers=None): """ Convenience method that provides a quick way to add an email group grant to a bucket. This method retrieves the current ACL, creates a new grant based on the parameters passed in, adds that grant to the ACL and then PUT's the new ACL back to GS. :type permission: string :param permission: The permission being granted. Should be one of: READ|WRITE|FULL_CONTROL See http://code.google.com/apis/storage/docs/developer-guide.html#authorization for more details on permissions. :type email_address: string :param email_address: The email address associated with the Google Group to which you are granting the permission. :type recursive: bool :param recursive: A boolean value to controls whether the call will apply the grant to all keys within the bucket or not. The default value is False. By passing a True value, the call will iterate through all keys in the bucket and apply the same grant to each key. CAUTION: If you have a lot of keys, this could take a long time! """ if permission not in GSPermissions: raise self.connection.provider.storage_permissions_error( 'Unknown Permission: %s' % permission) acl = self.get_acl(headers=headers) acl.add_group_email_grant(permission, email_address) self.set_acl(acl, headers=headers) if recursive: for key in self: key.add_group_email_grant(permission, email_address, headers=headers) # Method with same input signature as boto.s3.bucket.Bucket.list_grants() # (but returning different object type), to allow polymorphic treatment # at application layer. def list_grants(self, headers=None): acl = self.get_acl(headers=headers) return acl.entries def disable_logging(self, headers=None): xml_str = '' self.set_subresource('logging', xml_str, headers=headers) def enable_logging(self, target_bucket, target_prefix=None, headers=None, canned_acl=None): if isinstance(target_bucket, Bucket): target_bucket = target_bucket.name xml_str = '' xml_str = (xml_str + '%s' % target_bucket) if target_prefix: xml_str = (xml_str + '%s' % target_prefix) if canned_acl: xml_str = (xml_str + '%s' % canned_acl) xml_str = xml_str + '' self.set_subresource('logging', xml_str, headers=headers) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/gs/connection.py ================================================ # Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.gs.bucket import Bucket from boto.s3.connection import S3Connection from boto.s3.connection import SubdomainCallingFormat from boto.s3.connection import check_lowercase_bucketname class Location: DEFAULT = '' # US EU = 'EU' class GSConnection(S3Connection): DefaultHost = 'commondatastorage.googleapis.com' QueryString = 'Signature=%s&Expires=%d&AWSAccessKeyId=%s' def __init__(self, gs_access_key_id=None, gs_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, host=DefaultHost, debug=0, https_connection_factory=None, calling_format=SubdomainCallingFormat(), path='/'): S3Connection.__init__(self, gs_access_key_id, gs_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, host, debug, https_connection_factory, calling_format, path, "google", Bucket) def create_bucket(self, bucket_name, headers=None, location=Location.DEFAULT, policy=None): """ Creates a new bucket. By default it's located in the USA. You can pass Location.EU to create an European bucket. You can also pass a LocationConstraint, which (in addition to locating the bucket in the specified location) informs Google that Google services must not copy data out of that location. :type bucket_name: string :param bucket_name: The name of the new bucket :type headers: dict :param headers: Additional headers to pass along with the request to AWS. :type location: :class:`boto.gs.connection.Location` :param location: The location of the new bucket :type policy: :class:`boto.s3.acl.CannedACLStrings` :param policy: A canned ACL policy that will be applied to the new key in S3. """ check_lowercase_bucketname(bucket_name) if policy: if headers: headers[self.provider.acl_header] = policy else: headers = {self.provider.acl_header : policy} if not location: data = '' else: data = ('' '%s' '' % location) response = self.make_request('PUT', bucket_name, headers=headers, data=data) body = response.read() if response.status == 409: raise self.provider.storage_create_error( response.status, response.reason, body) if response.status == 200: return self.bucket_class(self, bucket_name) else: raise self.provider.storage_response_error( response.status, response.reason, body) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/gs/key.py ================================================ # Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import StringIO from boto.s3.key import Key as S3Key class Key(S3Key): def add_email_grant(self, permission, email_address): """ Convenience method that provides a quick way to add an email grant to a key. This method retrieves the current ACL, creates a new grant based on the parameters passed in, adds that grant to the ACL and then PUT's the new ACL back to GS. :type permission: string :param permission: The permission being granted. Should be one of: READ|FULL_CONTROL See http://code.google.com/apis/storage/docs/developer-guide.html#authorization for more details on permissions. :type email_address: string :param email_address: The email address associated with the Google account to which you are granting the permission. """ acl = self.get_acl() acl.add_email_grant(permission, email_address) self.set_acl(acl) def add_user_grant(self, permission, user_id): """ Convenience method that provides a quick way to add a canonical user grant to a key. This method retrieves the current ACL, creates a new grant based on the parameters passed in, adds that grant to the ACL and then PUT's the new ACL back to GS. :type permission: string :param permission: The permission being granted. Should be one of: READ|FULL_CONTROL See http://code.google.com/apis/storage/docs/developer-guide.html#authorization for more details on permissions. :type user_id: string :param user_id: The canonical user id associated with the GS account to which you are granting the permission. """ acl = self.get_acl() acl.add_user_grant(permission, user_id) self.set_acl(acl) def add_group_email_grant(self, permission, email_address, headers=None): """ Convenience method that provides a quick way to add an email group grant to a key. This method retrieves the current ACL, creates a new grant based on the parameters passed in, adds that grant to the ACL and then PUT's the new ACL back to GS. :type permission: string :param permission: The permission being granted. Should be one of: READ|FULL_CONTROL See http://code.google.com/apis/storage/docs/developer-guide.html#authorization for more details on permissions. :type email_address: string :param email_address: The email address associated with the Google Group to which you are granting the permission. """ acl = self.get_acl(headers=headers) acl.add_group_email_grant(permission, email_address) self.set_acl(acl, headers=headers) def add_group_grant(self, permission, group_id): """ Convenience method that provides a quick way to add a canonical group grant to a key. This method retrieves the current ACL, creates a new grant based on the parameters passed in, adds that grant to the ACL and then PUT's the new ACL back to GS. :type permission: string :param permission: The permission being granted. Should be one of: READ|FULL_CONTROL See http://code.google.com/apis/storage/docs/developer-guide.html#authorization for more details on permissions. :type group_id: string :param group_id: The canonical group id associated with the Google Groups account you are granting the permission to. """ acl = self.get_acl() acl.add_group_grant(permission, group_id) self.set_acl(acl) def set_contents_from_file(self, fp, headers=None, replace=True, cb=None, num_cb=10, policy=None, md5=None, res_upload_handler=None): """ Store an object in GS using the name of the Key object as the key in GS and the contents of the file pointed to by 'fp' as the contents. :type fp: file :param fp: the file whose contents are to be uploaded :type headers: dict :param headers: additional HTTP headers to be sent with the PUT request. :type replace: bool :param replace: If this parameter is False, the method will first check to see if an object exists in the bucket with the same key. If it does, it won't overwrite it. The default value is True which will overwrite the object. :type cb: function :param cb: a callback function that will be called to report progress on the upload. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted to GS and the second representing the total number of bytes that need to be transmitted. :type num_cb: int :param num_cb: (optional) If a callback is specified with the cb parameter, this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. :type policy: :class:`boto.gs.acl.CannedACLStrings` :param policy: A canned ACL policy that will be applied to the new key in GS. :type md5: A tuple containing the hexdigest version of the MD5 checksum of the file as the first element and the Base64-encoded version of the plain checksum as the second element. This is the same format returned by the compute_md5 method. :param md5: If you need to compute the MD5 for any reason prior to upload, it's silly to have to do it twice so this param, if present, will be used as the MD5 values of the file. Otherwise, the checksum will be computed. :type res_upload_handler: ResumableUploadHandler :param res_upload_handler: If provided, this handler will perform the upload. TODO: At some point we should refactor the Bucket and Key classes, to move functionality common to all providers into a parent class, and provider-specific functionality into subclasses (rather than just overriding/sharing code the way it currently works). """ provider = self.bucket.connection.provider headers = headers or {} if policy: headers[provider.acl_header] = policy if hasattr(fp, 'name'): self.path = fp.name if self.bucket != None: if not md5: md5 = self.compute_md5(fp) else: # Even if md5 is provided, still need to set size of content. fp.seek(0, 2) self.size = fp.tell() fp.seek(0) self.md5 = md5[0] self.base64md5 = md5[1] if self.name == None: self.name = self.md5 if not replace: k = self.bucket.lookup(self.name) if k: return if res_upload_handler: res_upload_handler.send_file(self, fp, headers, cb, num_cb) else: # Not a resumable transfer so use basic send_file mechanism. self.send_file(fp, headers, cb, num_cb) def set_contents_from_filename(self, filename, headers=None, replace=True, cb=None, num_cb=10, policy=None, md5=None, reduced_redundancy=None, res_upload_handler=None): """ Store an object in GS using the name of the Key object as the key in GS and the contents of the file named by 'filename'. See set_contents_from_file method for details about the parameters. :type filename: string :param filename: The name of the file that you want to put onto GS :type headers: dict :param headers: Additional headers to pass along with the request to GS. :type replace: bool :param replace: If True, replaces the contents of the file if it already exists. :type cb: function :param cb: (optional) a callback function that will be called to report progress on the download. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted from GS and the second representing the total number of bytes that need to be transmitted. :type cb: int :param num_cb: (optional) If a callback is specified with the cb parameter this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. :type policy: :class:`boto.gs.acl.CannedACLStrings` :param policy: A canned ACL policy that will be applied to the new key in GS. :type md5: A tuple containing the hexdigest version of the MD5 checksum of the file as the first element and the Base64-encoded version of the plain checksum as the second element. This is the same format returned by the compute_md5 method. :param md5: If you need to compute the MD5 for any reason prior to upload, it's silly to have to do it twice so this param, if present, will be used as the MD5 values of the file. Otherwise, the checksum will be computed. :type res_upload_handler: ResumableUploadHandler :param res_upload_handler: If provided, this handler will perform the upload. """ fp = open(filename, 'rb') self.set_contents_from_file(fp, headers, replace, cb, num_cb, policy, md5, res_upload_handler) fp.close() def set_contents_from_string(self, s, headers=None, replace=True, cb=None, num_cb=10, policy=None, md5=None): """ Store an object in S3 using the name of the Key object as the key in S3 and the string 's' as the contents. See set_contents_from_file method for details about the parameters. :type headers: dict :param headers: Additional headers to pass along with the request to AWS. :type replace: bool :param replace: If True, replaces the contents of the file if it already exists. :type cb: function :param cb: a callback function that will be called to report progress on the upload. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted to S3 and the second representing the size of the to be transmitted object. :type cb: int :param num_cb: (optional) If a callback is specified with the cb parameter this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. :type policy: :class:`boto.s3.acl.CannedACLStrings` :param policy: A canned ACL policy that will be applied to the new key in S3. :type md5: A tuple containing the hexdigest version of the MD5 checksum of the file as the first element and the Base64-encoded version of the plain checksum as the second element. This is the same format returned by the compute_md5 method. :param md5: If you need to compute the MD5 for any reason prior to upload, it's silly to have to do it twice so this param, if present, will be used as the MD5 values of the file. Otherwise, the checksum will be computed. """ if isinstance(s, unicode): s = s.encode("utf-8") fp = StringIO.StringIO(s) r = self.set_contents_from_file(fp, headers, replace, cb, num_cb, policy, md5) fp.close() return r ================================================ FILE: deploy/third_party/boto-2.1.1/boto/gs/resumable_upload_handler.py ================================================ # Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import cgi import errno import httplib import os import random import re import socket import time import urlparse import boto from boto import config from boto.connection import AWSAuthConnection from boto.exception import InvalidUriError from boto.exception import ResumableTransferDisposition from boto.exception import ResumableUploadException """ Handler for Google Cloud Storage resumable uploads. See http://code.google.com/apis/storage/docs/developer-guide.html#resumable for details. Resumable uploads will retry failed uploads, resuming at the byte count completed by the last upload attempt. If too many retries happen with no progress (per configurable num_retries param), the upload will be aborted in the current process. The caller can optionally specify a tracker_file_name param in the ResumableUploadHandler constructor. If you do this, that file will save the state needed to allow retrying later, in a separate process (e.g., in a later run of gsutil). """ class ResumableUploadHandler(object): BUFFER_SIZE = 8192 RETRYABLE_EXCEPTIONS = (httplib.HTTPException, IOError, socket.error, socket.gaierror) # (start, end) response indicating server has nothing (upload protocol uses # inclusive numbering). SERVER_HAS_NOTHING = (0, -1) def __init__(self, tracker_file_name=None, num_retries=None): """ Constructor. Instantiate once for each uploaded file. :type tracker_file_name: string :param tracker_file_name: optional file name to save tracker URI. If supplied and the current process fails the upload, it can be retried in a new process. If called with an existing file containing a valid tracker URI, we'll resume the upload from this URI; else we'll start a new resumable upload (and write the URI to this tracker file). :type num_retries: int :param num_retries: the number of times we'll re-try a resumable upload making no progress. (Count resets every time we get progress, so upload can span many more than this number of retries.) """ self.tracker_file_name = tracker_file_name self.num_retries = num_retries self.server_has_bytes = 0 # Byte count at last server check. self.tracker_uri = None if tracker_file_name: self._load_tracker_uri_from_file() # Save upload_start_point in instance state so caller can find how # much was transferred by this ResumableUploadHandler (across retries). self.upload_start_point = None def _load_tracker_uri_from_file(self): f = None try: f = open(self.tracker_file_name, 'r') uri = f.readline().strip() self._set_tracker_uri(uri) except IOError, e: # Ignore non-existent file (happens first time an upload # is attempted on a file), but warn user for other errors. if e.errno != errno.ENOENT: # Will restart because self.tracker_uri == None. print('Couldn\'t read URI tracker file (%s): %s. Restarting ' 'upload from scratch.' % (self.tracker_file_name, e.strerror)) except InvalidUriError, e: # Warn user, but proceed (will restart because # self.tracker_uri == None). print('Invalid tracker URI (%s) found in URI tracker file ' '(%s). Restarting upload from scratch.' % (uri, self.tracker_file_name)) finally: if f: f.close() def _save_tracker_uri_to_file(self): """ Saves URI to tracker file if one was passed to constructor. """ if not self.tracker_file_name: return f = None try: f = open(self.tracker_file_name, 'w') f.write(self.tracker_uri) except IOError, e: raise ResumableUploadException( 'Couldn\'t write URI tracker file (%s): %s.\nThis can happen' 'if you\'re using an incorrectly configured upload tool\n' '(e.g., gsutil configured to save tracker files to an ' 'unwritable directory)' % (self.tracker_file_name, e.strerror), ResumableTransferDisposition.ABORT) finally: if f: f.close() def _set_tracker_uri(self, uri): """ Called when we start a new resumable upload or get a new tracker URI for the upload. Saves URI and resets upload state. Raises InvalidUriError if URI is syntactically invalid. """ parse_result = urlparse.urlparse(uri) if (parse_result.scheme.lower() not in ['http', 'https'] or not parse_result.netloc or not parse_result.query): raise InvalidUriError('Invalid tracker URI (%s)' % uri) qdict = cgi.parse_qs(parse_result.query) if not qdict or not 'upload_id' in qdict: raise InvalidUriError('Invalid tracker URI (%s)' % uri) self.tracker_uri = uri self.tracker_uri_host = parse_result.netloc self.tracker_uri_path = '%s/?%s' % (parse_result.netloc, parse_result.query) self.server_has_bytes = 0 def get_tracker_uri(self): """ Returns upload tracker URI, or None if the upload has not yet started. """ return self.tracker_uri def _remove_tracker_file(self): if (self.tracker_file_name and os.path.exists(self.tracker_file_name)): os.unlink(self.tracker_file_name) def _build_content_range_header(self, range_spec='*', length_spec='*'): return 'bytes %s/%s' % (range_spec, length_spec) def _query_server_state(self, conn, file_length): """ Queries server to find out state of given upload. Note that this method really just makes special case use of the fact that the upload server always returns the current start/end state whenever a PUT doesn't complete. Returns HTTP response from sending request. Raises ResumableUploadException if problem querying server. """ # Send an empty PUT so that server replies with this resumable # transfer's state. put_headers = {} put_headers['Content-Range'] = ( self._build_content_range_header('*', file_length)) put_headers['Content-Length'] = '0' return AWSAuthConnection.make_request(conn, 'PUT', path=self.tracker_uri_path, auth_path=self.tracker_uri_path, headers=put_headers, host=self.tracker_uri_host) def _query_server_pos(self, conn, file_length): """ Queries server to find out what bytes it currently has. Returns (server_start, server_end), where the values are inclusive. For example, (0, 2) would mean that the server has bytes 0, 1, *and* 2. Raises ResumableUploadException if problem querying server. """ resp = self._query_server_state(conn, file_length) if resp.status == 200: return (0, file_length) # Completed upload. if resp.status != 308: # This means the server didn't have any state for the given # upload ID, which can happen (for example) if the caller saved # the tracker URI to a file and then tried to restart the transfer # after that upload ID has gone stale. In that case we need to # start a new transfer (and the caller will then save the new # tracker URI to the tracker file). raise ResumableUploadException( 'Got non-308 response (%s) from server state query' % resp.status, ResumableTransferDisposition.START_OVER) got_valid_response = False range_spec = resp.getheader('range') if range_spec: # Parse 'bytes=-' range_spec. m = re.search('bytes=(\d+)-(\d+)', range_spec) if m: server_start = long(m.group(1)) server_end = long(m.group(2)) got_valid_response = True else: # No Range header, which means the server does not yet have # any bytes. Note that the Range header uses inclusive 'from' # and 'to' values. Since Range 0-0 would mean that the server # has byte 0, omitting the Range header is used to indicate that # the server doesn't have any bytes. return self.SERVER_HAS_NOTHING if not got_valid_response: raise ResumableUploadException( 'Couldn\'t parse upload server state query response (%s)' % str(resp.getheaders()), ResumableTransferDisposition.START_OVER) if conn.debug >= 1: print 'Server has: Range: %d - %d.' % (server_start, server_end) return (server_start, server_end) def _start_new_resumable_upload(self, key, headers=None): """ Starts a new resumable upload. Raises ResumableUploadException if any errors occur. """ conn = key.bucket.connection if conn.debug >= 1: print 'Starting new resumable upload.' self.server_has_bytes = 0 # Start a new resumable upload by sending a POST request with an # empty body and the "X-Goog-Resumable: start" header. Include any # caller-provided headers (e.g., Content-Type) EXCEPT Content-Length # (and raise an exception if they tried to pass one, since it's # a semantic error to specify it at this point, and if we were to # include one now it would cause the server to expect that many # bytes; the POST doesn't include the actual file bytes We set # the Content-Length in the subsequent PUT, based on the uploaded # file size. post_headers = {} for k in headers: if k.lower() == 'content-length': raise ResumableUploadException( 'Attempt to specify Content-Length header (disallowed)', ResumableTransferDisposition.ABORT) post_headers[k] = headers[k] post_headers[conn.provider.resumable_upload_header] = 'start' resp = conn.make_request( 'POST', key.bucket.name, key.name, post_headers) # Get tracker URI from response 'Location' header. body = resp.read() # Check for various status conditions. if resp.status in [500, 503]: # Retry status 500 and 503 errors after a delay. raise ResumableUploadException( 'Got status %d from attempt to start resumable upload. ' 'Will wait/retry' % resp.status, ResumableTransferDisposition.WAIT_BEFORE_RETRY) elif resp.status != 200 and resp.status != 201: raise ResumableUploadException( 'Got status %d from attempt to start resumable upload. ' 'Aborting' % resp.status, ResumableTransferDisposition.ABORT) # Else we got 200 or 201 response code, indicating the resumable # upload was created. tracker_uri = resp.getheader('Location') if not tracker_uri: raise ResumableUploadException( 'No resumable tracker URI found in resumable initiation ' 'POST response (%s)' % body, ResumableTransferDisposition.WAIT_BEFORE_RETRY) self._set_tracker_uri(tracker_uri) self._save_tracker_uri_to_file() def _upload_file_bytes(self, conn, http_conn, fp, file_length, total_bytes_uploaded, cb, num_cb): """ Makes one attempt to upload file bytes, using an existing resumable upload connection. Returns etag from server upon success. Raises ResumableUploadException if any problems occur. """ buf = fp.read(self.BUFFER_SIZE) if cb: if num_cb > 2: cb_count = file_length / self.BUFFER_SIZE / (num_cb-2) elif num_cb < 0: cb_count = -1 else: cb_count = 0 i = 0 cb(total_bytes_uploaded, file_length) # Build resumable upload headers for the transfer. Don't send a # Content-Range header if the file is 0 bytes long, because the # resumable upload protocol uses an *inclusive* end-range (so, sending # 'bytes 0-0/1' would actually mean you're sending a 1-byte file). put_headers = {} if file_length: range_header = self._build_content_range_header( '%d-%d' % (total_bytes_uploaded, file_length - 1), file_length) put_headers['Content-Range'] = range_header # Set Content-Length to the total bytes we'll send with this PUT. put_headers['Content-Length'] = str(file_length - total_bytes_uploaded) http_request = AWSAuthConnection.build_base_http_request( conn, 'PUT', path=self.tracker_uri_path, auth_path=None, headers=put_headers, host=self.tracker_uri_host) http_conn.putrequest('PUT', http_request.path) for k in put_headers: http_conn.putheader(k, put_headers[k]) http_conn.endheaders() # Turn off debug on http connection so upload content isn't included # in debug stream. http_conn.set_debuglevel(0) while buf: http_conn.send(buf) total_bytes_uploaded += len(buf) if cb: i += 1 if i == cb_count or cb_count == -1: cb(total_bytes_uploaded, file_length) i = 0 buf = fp.read(self.BUFFER_SIZE) if cb: cb(total_bytes_uploaded, file_length) if total_bytes_uploaded != file_length: # Abort (and delete the tracker file) so if the user retries # they'll start a new resumable upload rather than potentially # attempting to pick back up later where we left off. raise ResumableUploadException( 'File changed during upload: EOF at %d bytes of %d byte file.' % (total_bytes_uploaded, file_length), ResumableTransferDisposition.ABORT) resp = http_conn.getresponse() body = resp.read() # Restore http connection debug level. http_conn.set_debuglevel(conn.debug) if resp.status == 200: return resp.getheader('etag') # Success # Retry timeout (408) and status 500 and 503 errors after a delay. elif resp.status in [408, 500, 503]: disposition = ResumableTransferDisposition.WAIT_BEFORE_RETRY else: # Catch all for any other error codes. disposition = ResumableTransferDisposition.ABORT raise ResumableUploadException('Got response code %d while attempting ' 'upload (%s)' % (resp.status, resp.reason), disposition) def _attempt_resumable_upload(self, key, fp, file_length, headers, cb, num_cb): """ Attempts a resumable upload. Returns etag from server upon success. Raises ResumableUploadException if any problems occur. """ (server_start, server_end) = self.SERVER_HAS_NOTHING conn = key.bucket.connection if self.tracker_uri: # Try to resume existing resumable upload. try: (server_start, server_end) = ( self._query_server_pos(conn, file_length)) self.server_has_bytes = server_start key=key if conn.debug >= 1: print 'Resuming transfer.' except ResumableUploadException, e: if conn.debug >= 1: print 'Unable to resume transfer (%s).' % e.message self._start_new_resumable_upload(key, headers) else: self._start_new_resumable_upload(key, headers) # upload_start_point allows the code that instantiated the # ResumableUploadHandler to find out the point from which it started # uploading (e.g., so it can correctly compute throughput). if self.upload_start_point is None: self.upload_start_point = server_end if server_end == file_length: # Boundary condition: complete file was already uploaded (e.g., # user interrupted a previous upload attempt after the upload # completed but before the gsutil tracker file was deleted). Set # total_bytes_uploaded to server_end so we'll attempt to upload # no more bytes but will still make final HTTP request and get # back the response (which contains the etag we need to compare # at the end). total_bytes_uploaded = server_end else: total_bytes_uploaded = server_end + 1 fp.seek(total_bytes_uploaded) conn = key.bucket.connection # Get a new HTTP connection (vs conn.get_http_connection(), which reuses # pool connections) because httplib requires a new HTTP connection per # transaction. (Without this, calling http_conn.getresponse() would get # "ResponseNotReady".) http_conn = conn.new_http_connection(self.tracker_uri_host, conn.is_secure) http_conn.set_debuglevel(conn.debug) # Make sure to close http_conn at end so if a local file read # failure occurs partway through server will terminate current upload # and can report that progress on next attempt. try: return self._upload_file_bytes(conn, http_conn, fp, file_length, total_bytes_uploaded, cb, num_cb) except (ResumableUploadException, socket.error): resp = self._query_server_state(conn, file_length) if resp.status == 400: raise ResumableUploadException('Got 400 response from server ' 'state query after failed resumable upload attempt. This ' 'can happen if the file size changed between upload ' 'attempts', ResumableTransferDisposition.ABORT) else: raise finally: http_conn.close() def _check_final_md5(self, key, etag): """ Checks that etag from server agrees with md5 computed before upload. This is important, since the upload could have spanned a number of hours and multiple processes (e.g., gsutil runs), and the user could change some of the file and not realize they have inconsistent data. """ if key.bucket.connection.debug >= 1: print 'Checking md5 against etag.' if key.md5 != etag.strip('"\''): # Call key.open_read() before attempting to delete the # (incorrect-content) key, so we perform that request on a # different HTTP connection. This is neededb because httplib # will return a "Response not ready" error if you try to perform # a second transaction on the connection. key.open_read() key.close() key.delete() raise ResumableUploadException( 'File changed during upload: md5 signature doesn\'t match etag ' '(incorrect uploaded object deleted)', ResumableTransferDisposition.ABORT) def send_file(self, key, fp, headers, cb=None, num_cb=10): """ Upload a file to a key into a bucket on GS, using GS resumable upload protocol. :type key: :class:`boto.s3.key.Key` or subclass :param key: The Key object to which data is to be uploaded :type fp: file-like object :param fp: The file pointer to upload :type headers: dict :param headers: The headers to pass along with the PUT request :type cb: function :param cb: a callback function that will be called to report progress on the upload. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted to GS, and the second representing the total number of bytes that need to be transmitted. :type num_cb: int :param num_cb: (optional) If a callback is specified with the cb parameter, this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. Providing a negative integer will cause your callback to be called with each buffer read. Raises ResumableUploadException if a problem occurs during the transfer. """ if not headers: headers = {} fp.seek(0, os.SEEK_END) file_length = fp.tell() fp.seek(0) debug = key.bucket.connection.debug # Use num-retries from constructor if one was provided; else check # for a value specified in the boto config file; else default to 5. if self.num_retries is None: self.num_retries = config.getint('Boto', 'num_retries', 5) progress_less_iterations = 0 while True: # Retry as long as we're making progress. server_had_bytes_before_attempt = self.server_has_bytes try: etag = self._attempt_resumable_upload(key, fp, file_length, headers, cb, num_cb) # Upload succceded, so remove the tracker file (if have one). self._remove_tracker_file() self._check_final_md5(key, etag) if debug >= 1: print 'Resumable upload complete.' return except self.RETRYABLE_EXCEPTIONS, e: if debug >= 1: print('Caught exception (%s)' % e.__repr__()) if isinstance(e, IOError) and e.errno == errno.EPIPE: # Broken pipe error causes httplib to immediately # close the socket (http://bugs.python.org/issue5542), # so we need to close the connection before we resume # the upload (which will cause a new connection to be # opened the next time an HTTP request is sent). key.bucket.connection.connection.close() except ResumableUploadException, e: if (e.disposition == ResumableTransferDisposition.ABORT_CUR_PROCESS): if debug >= 1: print('Caught non-retryable ResumableUploadException ' '(%s); aborting but retaining tracker file' % e.message) raise elif (e.disposition == ResumableTransferDisposition.ABORT): if debug >= 1: print('Caught non-retryable ResumableUploadException ' '(%s); aborting and removing tracker file' % e.message) self._remove_tracker_file() raise else: if debug >= 1: print('Caught ResumableUploadException (%s) - will ' 'retry' % e.message) # At this point we had a re-tryable failure; see if made progress. if self.server_has_bytes > server_had_bytes_before_attempt: progress_less_iterations = 0 else: progress_less_iterations += 1 if progress_less_iterations > self.num_retries: # Don't retry any longer in the current process. raise ResumableUploadException( 'Too many resumable upload attempts failed without ' 'progress. You might try this upload again later', ResumableTransferDisposition.ABORT_CUR_PROCESS) # Use binary exponential backoff to desynchronize client requests sleep_time_secs = random.random() * (2**progress_less_iterations) if debug >= 1: print ('Got retryable failure (%d progress-less in a row).\n' 'Sleeping %3.1f seconds before re-trying' % (progress_less_iterations, sleep_time_secs)) time.sleep(sleep_time_secs) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/gs/user.py ================================================ # Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class User: def __init__(self, parent=None, id='', name=''): if parent: parent.owner = self self.type = None self.id = id self.name = name def __repr__(self): return self.id def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'Name': self.name = value elif name == 'ID': self.id = value else: setattr(self, name, value) def to_xml(self, element_name='Owner'): if self.type: s = '<%s type="%s">' % (element_name, self.type) else: s = '<%s>' % element_name s += '%s' % self.id if self.name: s += '%s' % self.name s += '' % element_name return s ================================================ FILE: deploy/third_party/boto-2.1.1/boto/handler.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import xml.sax class XmlHandler(xml.sax.ContentHandler): def __init__(self, root_node, connection): self.connection = connection self.nodes = [('root', root_node)] self.current_text = '' def startElement(self, name, attrs): self.current_text = '' new_node = self.nodes[-1][1].startElement(name, attrs, self.connection) if new_node != None: self.nodes.append((name, new_node)) def endElement(self, name): self.nodes[-1][1].endElement(name, self.current_text, self.connection) if self.nodes[-1][0] == name: self.nodes.pop() self.current_text = '' def characters(self, content): self.current_text += content ================================================ FILE: deploy/third_party/boto-2.1.1/boto/https_connection.py ================================================ # Copyright 2007,2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # This file is derived from # http://googleappengine.googlecode.com/svn-history/r136/trunk/python/google/appengine/tools/https_wrapper.py """Extensions to allow HTTPS requests with SSL certificate validation.""" import httplib import re import socket import ssl import boto class InvalidCertificateException(httplib.HTTPException): """Raised when a certificate is provided with an invalid hostname.""" def __init__(self, host, cert, reason): """Constructor. Args: host: The hostname the connection was made to. cert: The SSL certificate (as a dictionary) the host returned. """ httplib.HTTPException.__init__(self) self.host = host self.cert = cert self.reason = reason def __str__(self): return ('Host %s returned an invalid certificate (%s): %s' % (self.host, self.reason, self.cert)) def GetValidHostsForCert(cert): """Returns a list of valid host globs for an SSL certificate. Args: cert: A dictionary representing an SSL certificate. Returns: list: A list of valid host globs. """ if 'subjectAltName' in cert: return [x[1] for x in cert['subjectAltName'] if x[0].lower() == 'dns'] else: return [x[0][1] for x in cert['subject'] if x[0][0].lower() == 'commonname'] def ValidateCertificateHostname(cert, hostname): """Validates that a given hostname is valid for an SSL certificate. Args: cert: A dictionary representing an SSL certificate. hostname: The hostname to test. Returns: bool: Whether or not the hostname is valid for this certificate. """ hosts = GetValidHostsForCert(cert) boto.log.debug( "validating server certificate: hostname=%s, certificate hosts=%s", hostname, hosts) for host in hosts: host_re = host.replace('.', '\.').replace('*', '[^.]*') if re.search('^%s$' % (host_re,), hostname, re.I): return True return False class CertValidatingHTTPSConnection(httplib.HTTPConnection): """An HTTPConnection that connects over SSL and validates certificates.""" default_port = httplib.HTTPS_PORT def __init__(self, host, port=None, key_file=None, cert_file=None, ca_certs=None, strict=None, **kwargs): """Constructor. Args: host: The hostname. Can be in 'host:port' form. port: The port. Defaults to 443. key_file: A file containing the client's private key cert_file: A file containing the client's certificates ca_certs: A file contianing a set of concatenated certificate authority certs for validating the server against. strict: When true, causes BadStatusLine to be raised if the status line can't be parsed as a valid HTTP/1.0 or 1.1 status line. """ httplib.HTTPConnection.__init__(self, host, port, strict, **kwargs) self.key_file = key_file self.cert_file = cert_file self.ca_certs = ca_certs def connect(self): "Connect to a host on a given (SSL) port." sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) boto.log.debug("wrapping ssl socket; CA certificate file=%s", self.ca_certs) self.sock = ssl.wrap_socket(sock, keyfile=self.key_file, certfile=self.cert_file, cert_reqs=ssl.CERT_REQUIRED, ca_certs=self.ca_certs) cert = self.sock.getpeercert() hostname = self.host.split(':', 0)[0] if not ValidateCertificateHostname(cert, hostname): raise InvalidCertificateException(hostname, cert, 'remote hostname "%s" does not match '\ 'certificate' % hostname) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/iam/__init__.py ================================================ # Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010-2011, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # this is here for backward compatibility # originally, the IAMConnection class was defined here from connection import IAMConnection ================================================ FILE: deploy/third_party/boto-2.1.1/boto/iam/connection.py ================================================ # Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010-2011, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import boto import boto.jsonresponse from boto.iam.summarymap import SummaryMap from boto.connection import AWSQueryConnection #boto.set_stream_logger('iam') class IAMConnection(AWSQueryConnection): APIVersion = '2010-05-08' def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, host='iam.amazonaws.com', debug=0, https_connection_factory=None, path='/'): AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, host, debug, https_connection_factory, path) def _required_auth_capability(self): return ['iam'] def get_response(self, action, params, path='/', parent=None, verb='GET', list_marker='Set'): """ Utility method to handle calls to IAM and parsing of responses. """ if not parent: parent = self response = self.make_request(action, params, path, verb) body = response.read() boto.log.debug(body) if response.status == 200: e = boto.jsonresponse.Element(list_marker=list_marker, pythonize_name=True) h = boto.jsonresponse.XmlHandler(e, parent) h.parse(body) return e else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) # # Group methods # def get_all_groups(self, path_prefix='/', marker=None, max_items=None): """ List the groups that have the specified path prefix. :type path_prefix: string :param path_prefix: If provided, only groups whose paths match the provided prefix will be returned. :type marker: string :param marker: Use this only when paginating results and only in follow-up request after you've received a response where the results are truncated. Set this to the value of the Marker element in the response you just received. :type max_items: int :param max_items: Use this only when paginating results to indicate the maximum number of groups you want in the response. """ params = {} if path_prefix: params['PathPrefix'] = path_prefix if marker: params['Marker'] = marker if max_items: params['MaxItems'] = max_items return self.get_response('ListGroups', params, list_marker='Groups') def get_group(self, group_name, marker=None, max_items=None): """ Return a list of users that are in the specified group. :type group_name: string :param group_name: The name of the group whose information should be returned. :type marker: string :param marker: Use this only when paginating results and only in follow-up request after you've received a response where the results are truncated. Set this to the value of the Marker element in the response you just received. :type max_items: int :param max_items: Use this only when paginating results to indicate the maximum number of groups you want in the response. """ params = {'GroupName' : group_name} if marker: params['Marker'] = marker if max_items: params['MaxItems'] = max_items return self.get_response('GetGroup', params, list_marker='Users') def create_group(self, group_name, path='/'): """ Create a group. :type group_name: string :param group_name: The name of the new group :type path: string :param path: The path to the group (Optional). Defaults to /. """ params = {'GroupName' : group_name, 'Path' : path} return self.get_response('CreateGroup', params) def delete_group(self, group_name): """ Delete a group. The group must not contain any Users or have any attached policies :type group_name: string :param group_name: The name of the group to delete. """ params = {'GroupName' : group_name} return self.get_response('DeleteGroup', params) def update_group(self, group_name, new_group_name=None, new_path=None): """ Updates name and/or path of the specified group. :type group_name: string :param group_name: The name of the new group :type new_group_name: string :param new_group_name: If provided, the name of the group will be changed to this name. :type new_path: string :param new_path: If provided, the path of the group will be changed to this path. """ params = {'GroupName' : group_name} if new_group_name: params['NewGroupName'] = new_group_name if new_path: params['NewPath'] = new_path return self.get_response('UpdateGroup', params) def add_user_to_group(self, group_name, user_name): """ Add a user to a group :type group_name: string :param group_name: The name of the group :type user_name: string :param user_name: The to be added to the group. """ params = {'GroupName' : group_name, 'UserName' : user_name} return self.get_response('AddUserToGroup', params) def remove_user_from_group(self, group_name, user_name): """ Remove a user from a group. :type group_name: string :param group_name: The name of the group :type user_name: string :param user_name: The user to remove from the group. """ params = {'GroupName' : group_name, 'UserName' : user_name} return self.get_response('RemoveUserFromGroup', params) def put_group_policy(self, group_name, policy_name, policy_json): """ Adds or updates the specified policy document for the specified group. :type group_name: string :param group_name: The name of the group the policy is associated with. :type policy_name: string :param policy_name: The policy document to get. :type policy_json: string :param policy_json: The policy document. """ params = {'GroupName' : group_name, 'PolicyName' : policy_name, 'PolicyDocument' : policy_json} return self.get_response('PutGroupPolicy', params, verb='POST') def get_all_group_policies(self, group_name, marker=None, max_items=None): """ List the names of the policies associated with the specified group. :type group_name: string :param group_name: The name of the group the policy is associated with. :type marker: string :param marker: Use this only when paginating results and only in follow-up request after you've received a response where the results are truncated. Set this to the value of the Marker element in the response you just received. :type max_items: int :param max_items: Use this only when paginating results to indicate the maximum number of groups you want in the response. """ params = {'GroupName' : group_name} if marker: params['Marker'] = marker if max_items: params['MaxItems'] = max_items return self.get_response('ListGroupPolicies', params, list_marker='PolicyNames') def get_group_policy(self, group_name, policy_name): """ Retrieves the specified policy document for the specified group. :type group_name: string :param group_name: The name of the group the policy is associated with. :type policy_name: string :param policy_name: The policy document to get. """ params = {'GroupName' : group_name, 'PolicyName' : policy_name} return self.get_response('GetGroupPolicy', params, verb='POST') def delete_group_policy(self, group_name, policy_name): """ Deletes the specified policy document for the specified group. :type group_name: string :param group_name: The name of the group the policy is associated with. :type policy_name: string :param policy_name: The policy document to delete. """ params = {'GroupName' : group_name, 'PolicyName' : policy_name} return self.get_response('DeleteGroupPolicy', params, verb='POST') def get_all_users(self, path_prefix='/', marker=None, max_items=None): """ List the users that have the specified path prefix. :type path_prefix: string :param path_prefix: If provided, only users whose paths match the provided prefix will be returned. :type marker: string :param marker: Use this only when paginating results and only in follow-up request after you've received a response where the results are truncated. Set this to the value of the Marker element in the response you just received. :type max_items: int :param max_items: Use this only when paginating results to indicate the maximum number of groups you want in the response. """ params = {'PathPrefix' : path_prefix} if marker: params['Marker'] = marker if max_items: params['MaxItems'] = max_items return self.get_response('ListUsers', params, list_marker='Users') # # User methods # def create_user(self, user_name, path='/'): """ Create a user. :type user_name: string :param user_name: The name of the new user :type path: string :param path: The path in which the user will be created. Defaults to /. """ params = {'UserName' : user_name, 'Path' : path} return self.get_response('CreateUser', params) def delete_user(self, user_name): """ Delete a user including the user's path, GUID and ARN. If the user_name is not specified, the user_name is determined implicitly based on the AWS Access Key ID used to sign the request. :type user_name: string :param user_name: The name of the user to delete. """ params = {'UserName' : user_name} return self.get_response('DeleteUser', params) def get_user(self, user_name=None): """ Retrieve information about the specified user. If the user_name is not specified, the user_name is determined implicitly based on the AWS Access Key ID used to sign the request. :type user_name: string :param user_name: The name of the user to delete. If not specified, defaults to user making request. """ params = {} if user_name: params['UserName'] = user_name return self.get_response('GetUser', params) def update_user(self, user_name, new_user_name=None, new_path=None): """ Updates name and/or path of the specified user. :type user_name: string :param user_name: The name of the user :type new_user_name: string :param new_user_name: If provided, the username of the user will be changed to this username. :type new_path: string :param new_path: If provided, the path of the user will be changed to this path. """ params = {'UserName' : user_name} if new_user_name: params['NewUserName'] = new_user_name if new_path: params['NewPath'] = new_path return self.get_response('UpdateUser', params) def get_all_user_policies(self, user_name, marker=None, max_items=None): """ List the names of the policies associated with the specified user. :type user_name: string :param user_name: The name of the user the policy is associated with. :type marker: string :param marker: Use this only when paginating results and only in follow-up request after you've received a response where the results are truncated. Set this to the value of the Marker element in the response you just received. :type max_items: int :param max_items: Use this only when paginating results to indicate the maximum number of groups you want in the response. """ params = {'UserName' : user_name} if marker: params['Marker'] = marker if max_items: params['MaxItems'] = max_items return self.get_response('ListUserPolicies', params, list_marker='PolicyNames') def put_user_policy(self, user_name, policy_name, policy_json): """ Adds or updates the specified policy document for the specified user. :type user_name: string :param user_name: The name of the user the policy is associated with. :type policy_name: string :param policy_name: The policy document to get. :type policy_json: string :param policy_json: The policy document. """ params = {'UserName' : user_name, 'PolicyName' : policy_name, 'PolicyDocument' : policy_json} return self.get_response('PutUserPolicy', params, verb='POST') def get_user_policy(self, user_name, policy_name): """ Retrieves the specified policy document for the specified user. :type user_name: string :param user_name: The name of the user the policy is associated with. :type policy_name: string :param policy_name: The policy document to get. """ params = {'UserName' : user_name, 'PolicyName' : policy_name} return self.get_response('GetUserPolicy', params, verb='POST') def delete_user_policy(self, user_name, policy_name): """ Deletes the specified policy document for the specified user. :type user_name: string :param user_name: The name of the user the policy is associated with. :type policy_name: string :param policy_name: The policy document to delete. """ params = {'UserName' : user_name, 'PolicyName' : policy_name} return self.get_response('DeleteUserPolicy', params, verb='POST') def get_groups_for_user(self, user_name, marker=None, max_items=None): """ List the groups that a specified user belongs to. :type user_name: string :param user_name: The name of the user to list groups for. :type marker: string :param marker: Use this only when paginating results and only in follow-up request after you've received a response where the results are truncated. Set this to the value of the Marker element in the response you just received. :type max_items: int :param max_items: Use this only when paginating results to indicate the maximum number of groups you want in the response. """ params = {'UserName' : user_name} if marker: params['Marker'] = marker if max_items: params['MaxItems'] = max_items return self.get_response('ListGroupsForUser', params, list_marker='Groups') # # Access Keys # def get_all_access_keys(self, user_name, marker=None, max_items=None): """ Get all access keys associated with an account. :type user_name: string :param user_name: The username of the user :type marker: string :param marker: Use this only when paginating results and only in follow-up request after you've received a response where the results are truncated. Set this to the value of the Marker element in the response you just received. :type max_items: int :param max_items: Use this only when paginating results to indicate the maximum number of groups you want in the response. """ params = {'UserName' : user_name} if marker: params['Marker'] = marker if max_items: params['MaxItems'] = max_items return self.get_response('ListAccessKeys', params, list_marker='AccessKeyMetadata') def create_access_key(self, user_name=None): """ Create a new AWS Secret Access Key and corresponding AWS Access Key ID for the specified user. The default status for new keys is Active If the user_name is not specified, the user_name is determined implicitly based on the AWS Access Key ID used to sign the request. :type user_name: string :param user_name: The username of the user """ params = {'UserName' : user_name} return self.get_response('CreateAccessKey', params) def update_access_key(self, access_key_id, status, user_name=None): """ Changes the status of the specified access key from Active to Inactive or vice versa. This action can be used to disable a user's key as part of a key rotation workflow. If the user_name is not specified, the user_name is determined implicitly based on the AWS Access Key ID used to sign the request. :type access_key_id: string :param access_key_id: The ID of the access key. :type status: string :param status: Either Active or Inactive. :type user_name: string :param user_name: The username of user (optional). """ params = {'AccessKeyId' : access_key_id, 'Status' : status} if user_name: params['UserName'] = user_name return self.get_response('UpdateAccessKey', params) def delete_access_key(self, access_key_id, user_name=None): """ Delete an access key associated with a user. If the user_name is not specified, it is determined implicitly based on the AWS Access Key ID used to sign the request. :type access_key_id: string :param access_key_id: The ID of the access key to be deleted. :type user_name: string :param user_name: The username of the user """ params = {'AccessKeyId' : access_key_id} if user_name: params['UserName'] = user_name return self.get_response('DeleteAccessKey', params) # # Signing Certificates # def get_all_signing_certs(self, marker=None, max_items=None, user_name=None): """ Get all signing certificates associated with an account. If the user_name is not specified, it is determined implicitly based on the AWS Access Key ID used to sign the request. :type marker: string :param marker: Use this only when paginating results and only in follow-up request after you've received a response where the results are truncated. Set this to the value of the Marker element in the response you just received. :type max_items: int :param max_items: Use this only when paginating results to indicate the maximum number of groups you want in the response. :type user_name: string :param user_name: The username of the user """ params = {} if marker: params['Marker'] = marker if max_items: params['MaxItems'] = max_items if user_name: params['UserName'] = user_name return self.get_response('ListSigningCertificates', params, list_marker='Certificates') def update_signing_cert(self, cert_id, status, user_name=None): """ Change the status of the specified signing certificate from Active to Inactive or vice versa. If the user_name is not specified, it is determined implicitly based on the AWS Access Key ID used to sign the request. :type cert_id: string :param cert_id: The ID of the signing certificate :type status: string :param status: Either Active or Inactive. :type user_name: string :param user_name: The username of the user """ params = {'CertificateId' : cert_id, 'Status' : status} if user_name: params['UserName'] = user_name return self.get_response('UpdateSigningCertificate', params) def upload_signing_cert(self, cert_body, user_name=None): """ Uploads an X.509 signing certificate and associates it with the specified user. If the user_name is not specified, it is determined implicitly based on the AWS Access Key ID used to sign the request. :type cert_body: string :param cert_body: The body of the signing certificate. :type user_name: string :param user_name: The username of the user """ params = {'CertificateBody' : cert_body} if user_name: params['UserName'] = user_name return self.get_response('UploadSigningCertificate', params, verb='POST') def delete_signing_cert(self, cert_id, user_name=None): """ Delete a signing certificate associated with a user. If the user_name is not specified, it is determined implicitly based on the AWS Access Key ID used to sign the request. :type user_name: string :param user_name: The username of the user :type cert_id: string :param cert_id: The ID of the certificate. """ params = {'CertificateId' : cert_id} if user_name: params['UserName'] = user_name return self.get_response('DeleteSigningCertificate', params) # # Server Certificates # def get_all_server_certs(self, path_prefix='/', marker=None, max_items=None): """ Lists the server certificates that have the specified path prefix. If none exist, the action returns an empty list. :type path_prefix: string :param path_prefix: If provided, only certificates whose paths match the provided prefix will be returned. :type marker: string :param marker: Use this only when paginating results and only in follow-up request after you've received a response where the results are truncated. Set this to the value of the Marker element in the response you just received. :type max_items: int :param max_items: Use this only when paginating results to indicate the maximum number of groups you want in the response. """ params = {} if path_prefix: params['PathPrefix'] = path_prefix if marker: params['Marker'] = marker if max_items: params['MaxItems'] = max_items return self.get_response('ListServerCertificates', params, list_marker='ServerCertificateMetadataList') def update_server_cert(self, cert_name, new_cert_name=None, new_path=None): """ Updates the name and/or the path of the specified server certificate. :type cert_name: string :param cert_name: The name of the server certificate that you want to update. :type new_cert_name: string :param new_cert_name: The new name for the server certificate. Include this only if you are updating the server certificate's name. :type new_path: string :param new_path: If provided, the path of the certificate will be changed to this path. """ params = {'ServerCertificateName' : cert_name} if new_cert_name: params['NewServerCertificateName'] = new_cert_name if new_path: params['NewPath'] = new_path return self.get_response('UpdateServerCertificate', params) def upload_server_cert(self, cert_name, cert_body, private_key, cert_chain=None, path=None): """ Uploads a server certificate entity for the AWS Account. The server certificate entity includes a public key certificate, a private key, and an optional certificate chain, which should all be PEM-encoded. :type cert_name: string :param cert_name: The name for the server certificate. Do not include the path in this value. :type cert_body: string :param cert_body: The contents of the public key certificate in PEM-encoded format. :type private_key: string :param private_key: The contents of the private key in PEM-encoded format. :type cert_chain: string :param cert_chain: The contents of the certificate chain. This is typically a concatenation of the PEM-encoded public key certificates of the chain. :type path: string :param path: The path for the server certificate. """ params = {'ServerCertificateName' : cert_name, 'CertificateBody' : cert_body, 'PrivateKey' : private_key} if cert_chain: params['CertificateChain'] = cert_chain if path: params['Path'] = path return self.get_response('UploadServerCertificate', params, verb='POST') def get_server_certificate(self, cert_name): """ Retrieves information about the specified server certificate. :type cert_name: string :param cert_name: The name of the server certificate you want to retrieve information about. """ params = {'ServerCertificateName' : cert_name} return self.get_response('GetServerCertificate', params) def delete_server_cert(self, cert_name): """ Delete the specified server certificate. :type cert_name: string :param cert_name: The name of the server certificate you want to delete. """ params = {'ServerCertificateName' : cert_name} return self.get_response('DeleteServerCertificate', params) # # MFA Devices # def get_all_mfa_devices(self, user_name, marker=None, max_items=None): """ Get all MFA devices associated with an account. :type user_name: string :param user_name: The username of the user :type marker: string :param marker: Use this only when paginating results and only in follow-up request after you've received a response where the results are truncated. Set this to the value of the Marker element in the response you just received. :type max_items: int :param max_items: Use this only when paginating results to indicate the maximum number of groups you want in the response. """ params = {'UserName' : user_name} if marker: params['Marker'] = marker if max_items: params['MaxItems'] = max_items return self.get_response('ListMFADevices', params, list_marker='MFADevices') def enable_mfa_device(self, user_name, serial_number, auth_code_1, auth_code_2): """ Enables the specified MFA device and associates it with the specified user. :type user_name: string :param user_name: The username of the user :type serial_number: string :param seriasl_number: The serial number which uniquely identifies the MFA device. :type auth_code_1: string :param auth_code_1: An authentication code emitted by the device. :type auth_code_2: string :param auth_code_2: A subsequent authentication code emitted by the device. """ params = {'UserName' : user_name, 'SerialNumber' : serial_number, 'AuthenticationCode1' : auth_code_1, 'AuthenticationCode2' : auth_code_2} return self.get_response('EnableMFADevice', params) def deactivate_mfa_device(self, user_name, serial_number): """ Deactivates the specified MFA device and removes it from association with the user. :type user_name: string :param user_name: The username of the user :type serial_number: string :param seriasl_number: The serial number which uniquely identifies the MFA device. """ params = {'UserName' : user_name, 'SerialNumber' : serial_number} return self.get_response('DeactivateMFADevice', params) def resync_mfa_device(self, user_name, serial_number, auth_code_1, auth_code_2): """ Syncronizes the specified MFA device with the AWS servers. :type user_name: string :param user_name: The username of the user :type serial_number: string :param seriasl_number: The serial number which uniquely identifies the MFA device. :type auth_code_1: string :param auth_code_1: An authentication code emitted by the device. :type auth_code_2: string :param auth_code_2: A subsequent authentication code emitted by the device. """ params = {'UserName' : user_name, 'SerialNumber' : serial_number, 'AuthenticationCode1' : auth_code_1, 'AuthenticationCode2' : auth_code_2} return self.get_response('ResyncMFADevice', params) # # Login Profiles # def get_login_profiles(self, user_name): """ Retrieves the login profile for the specified user. :type user_name: string :param user_name: The username of the user """ params = {'UserName' : user_name} return self.get_response('GetLoginProfile', params) def create_login_profile(self, user_name, password): """ Creates a login profile for the specified user, give the user the ability to access AWS services and the AWS Management Console. :type user_name: string :param user_name: The name of the user :type password: string :param password: The new password for the user """ params = {'UserName' : user_name, 'Password' : password} return self.get_response('CreateLoginProfile', params) def delete_login_profile(self, user_name): """ Deletes the login profile associated with the specified user. :type user_name: string :param user_name: The name of the user to delete. """ params = {'UserName' : user_name} return self.get_response('DeleteLoginProfile', params) def update_login_profile(self, user_name, password): """ Resets the password associated with the user's login profile. :type user_name: string :param user_name: The name of the user :type password: string :param password: The new password for the user """ params = {'UserName' : user_name, 'Password' : password} return self.get_response('UpdateLoginProfile', params) def create_account_alias(self, alias): """ Creates a new alias for the AWS account. For more information on account id aliases, please see http://goo.gl/ToB7G :type alias: string :param alias: The alias to attach to the account. """ params = {'AccountAlias': alias} return self.get_response('CreateAccountAlias', params) def delete_account_alias(self, alias): """ Deletes an alias for the AWS account. For more information on account id aliases, please see http://goo.gl/ToB7G :type alias: string :param alias: The alias to remove from the account. """ params = {'AccountAlias': alias} return self.get_response('DeleteAccountAlias', params) def get_account_alias(self): """ Get the alias for the current account. This is referred to in the docs as list_account_aliases, but it seems you can only have one account alias currently. For more information on account id aliases, please see http://goo.gl/ToB7G """ return self.get_response('ListAccountAliases', {}, list_marker='AccountAliases') def get_signin_url(self, service='ec2'): """ Get the URL where IAM users can use their login profile to sign in to this account's console. :type service: string :param service: Default service to go to in the console. """ alias = self.get_account_alias() if not alias: raise Exception('No alias associated with this account. Please use iam.create_account_alias() first.') return "https://%s.signin.aws.amazon.com/console/%s" % (alias, service) def get_account_summary(self): """ Get the alias for the current account. This is referred to in the docs as list_account_aliases, but it seems you can only have one account alias currently. For more information on account id aliases, please see http://goo.gl/ToB7G """ return self.get_object('GetAccountSummary', {}, SummaryMap) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/iam/summarymap.py ================================================ # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class SummaryMap(dict): def __init__(self, parent=None): self.parent = parent dict.__init__(self) def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'key': self._name = value elif name == 'value': try: self[self._name] = int(value) except ValueError: self[self._name] = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/jsonresponse.py ================================================ # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import xml.sax import utils class XmlHandler(xml.sax.ContentHandler): def __init__(self, root_node, connection): self.connection = connection self.nodes = [('root', root_node)] self.current_text = '' def startElement(self, name, attrs): self.current_text = '' t = self.nodes[-1][1].startElement(name, attrs, self.connection) if t != None: if isinstance(t, tuple): self.nodes.append(t) else: self.nodes.append((name, t)) def endElement(self, name): self.nodes[-1][1].endElement(name, self.current_text, self.connection) if self.nodes[-1][0] == name: self.nodes.pop() self.current_text = '' def characters(self, content): self.current_text += content def parse(self, s): xml.sax.parseString(s, self) class Element(dict): def __init__(self, connection=None, element_name=None, stack=None, parent=None, list_marker=('Set',), item_marker=('member', 'item'), pythonize_name=False): dict.__init__(self) self.connection = connection self.element_name = element_name self.list_marker = utils.mklist(list_marker) self.item_marker = utils.mklist(item_marker) if stack is None: self.stack = [] else: self.stack = stack self.pythonize_name = pythonize_name self.parent = parent def __getattr__(self, key): if key in self: return self[key] for k in self: e = self[k] if isinstance(e, Element): try: return getattr(e, key) except AttributeError: pass raise AttributeError def get_name(self, name): if self.pythonize_name: name = utils.pythonize_name(name) return name def startElement(self, name, attrs, connection): self.stack.append(name) for lm in self.list_marker: if name.endswith(lm): l = ListElement(self.connection, name, self.list_marker, self.item_marker, self.pythonize_name) self[self.get_name(name)] = l return l if len(self.stack) > 0: element_name = self.stack[-1] e = Element(self.connection, element_name, self.stack, self, self.list_marker, self.item_marker, self.pythonize_name) self[self.get_name(element_name)] = e return (element_name, e) else: return None def endElement(self, name, value, connection): if len(self.stack) > 0: self.stack.pop() value = value.strip() if value: if isinstance(self.parent, Element): self.parent[self.get_name(name)] = value elif isinstance(self.parent, ListElement): self.parent.append(value) class ListElement(list): def __init__(self, connection=None, element_name=None, list_marker=['Set'], item_marker=('member', 'item'), pythonize_name=False): list.__init__(self) self.connection = connection self.element_name = element_name self.list_marker = list_marker self.item_marker = item_marker self.pythonize_name = pythonize_name def get_name(self, name): if self.pythonize_name: name = utils.pythonize_name(name) return name def startElement(self, name, attrs, connection): for lm in self.list_marker: if name.endswith(lm): l = ListElement(self.connection, name, self.item_marker, pythonize_name=self.pythonize_name) setattr(self, self.get_name(name), l) return l if name in self.item_marker: e = Element(self.connection, name, parent=self, pythonize_name=self.pythonize_name) self.append(e) return e else: return None def endElement(self, name, value, connection): if name == self.element_name: if len(self) > 0: empty = [] for e in self: if isinstance(e, Element): if len(e) == 0: empty.append(e) for e in empty: self.remove(e) else: setattr(self, self.get_name(name), value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/manage/__init__.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # ================================================ FILE: deploy/third_party/boto-2.1.1/boto/manage/cmdshell.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.mashups.interactive import interactive_shell import boto import os import time import shutil import StringIO import paramiko import socket import subprocess class SSHClient(object): def __init__(self, server, host_key_file='~/.ssh/known_hosts', uname='root', ssh_pwd=None): self.server = server self.host_key_file = host_key_file self.uname = uname self._pkey = paramiko.RSAKey.from_private_key_file(server.ssh_key_file, password=ssh_pwd) self._ssh_client = paramiko.SSHClient() self._ssh_client.load_system_host_keys() self._ssh_client.load_host_keys(os.path.expanduser(host_key_file)) self._ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.connect() def connect(self): retry = 0 while retry < 5: try: self._ssh_client.connect(self.server.hostname, username=self.uname, pkey=self._pkey) return except socket.error, (value,message): if value == 61 or value == 111: print 'SSH Connection refused, will retry in 5 seconds' time.sleep(5) retry += 1 else: raise except paramiko.BadHostKeyException: print "%s has an entry in ~/.ssh/known_hosts and it doesn't match" % self.server.hostname print 'Edit that file to remove the entry and then hit return to try again' raw_input('Hit Enter when ready') retry += 1 except EOFError: print 'Unexpected Error from SSH Connection, retry in 5 seconds' time.sleep(5) retry += 1 print 'Could not establish SSH connection' def open_sftp(self): return self._ssh_client.open_sftp() def get_file(self, src, dst): sftp_client = self.open_sftp() sftp_client.get(src, dst) def put_file(self, src, dst): sftp_client = self.open_sftp() sftp_client.put(src, dst) def open(self, filename, mode='r', bufsize=-1): """ Open a file on the remote system and return a file-like object. """ sftp_client = self.open_sftp() return sftp_client.open(filename, mode, bufsize) def listdir(self, path): sftp_client = self.open_sftp() return sftp_client.listdir(path) def isdir(self, path): status = self.run('[ -d %s ] || echo "FALSE"' % path) if status[1].startswith('FALSE'): return 0 return 1 def exists(self, path): status = self.run('[ -a %s ] || echo "FALSE"' % path) if status[1].startswith('FALSE'): return 0 return 1 def shell(self): """ Start an interactive shell session on the remote host. """ channel = self._ssh_client.invoke_shell() interactive_shell(channel) def run(self, command): """ Execute a command on the remote host. Return a tuple containing an integer status and a two strings, the first containing stdout and the second containing stderr from the command. """ boto.log.debug('running:%s on %s' % (command, self.server.instance_id)) status = 0 try: t = self._ssh_client.exec_command(command) except paramiko.SSHException: status = 1 std_out = t[1].read() std_err = t[2].read() t[0].close() t[1].close() t[2].close() boto.log.debug('stdout: %s' % std_out) boto.log.debug('stderr: %s' % std_err) return (status, std_out, std_err) def run_pty(self, command): """ Execute a command on the remote host with a pseudo-terminal. Returns a string containing the output of the command. """ boto.log.debug('running:%s on %s' % (command, self.server.instance_id)) channel = self._ssh_client.get_transport().open_session() channel.get_pty() channel.exec_command(command) return channel.recv(1024) def close(self): transport = self._ssh_client.get_transport() transport.close() self.server.reset_cmdshell() class LocalClient(object): def __init__(self, server, host_key_file=None, uname='root'): self.server = server self.host_key_file = host_key_file self.uname = uname def get_file(self, src, dst): shutil.copyfile(src, dst) def put_file(self, src, dst): shutil.copyfile(src, dst) def listdir(self, path): return os.listdir(path) def isdir(self, path): return os.path.isdir(path) def exists(self, path): return os.path.exists(path) def shell(self): raise NotImplementedError, 'shell not supported with LocalClient' def run(self): boto.log.info('running:%s' % self.command) log_fp = StringIO.StringIO() process = subprocess.Popen(self.command, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) while process.poll() == None: time.sleep(1) t = process.communicate() log_fp.write(t[0]) log_fp.write(t[1]) boto.log.info(log_fp.getvalue()) boto.log.info('output: %s' % log_fp.getvalue()) return (process.returncode, log_fp.getvalue()) def close(self): pass class FakeServer(object): """ A little class to fake out SSHClient (which is expecting a :class`boto.manage.server.Server` instance. This allows us to """ def __init__(self, instance, ssh_key_file): self.instance = instance self.ssh_key_file = ssh_key_file self.hostname = instance.dns_name self.instance_id = self.instance.id def start(server): instance_id = boto.config.get('Instance', 'instance-id', None) if instance_id == server.instance_id: return LocalClient(server) else: return SSHClient(server) def sshclient_from_instance(instance, ssh_key_file, host_key_file='~/.ssh/known_hosts', user_name='root', ssh_pwd=None): """ Create and return an SSHClient object given an instance object. :type instance: :class`boto.ec2.instance.Instance` object :param instance: The instance object. :type ssh_key_file: str :param ssh_key_file: A path to the private key file used to log into instance. :type host_key_file: str :param host_key_file: A path to the known_hosts file used by the SSH client. Defaults to ~/.ssh/known_hosts :type user_name: str :param user_name: The username to use when logging into the instance. Defaults to root. :type ssh_pwd: str :param ssh_pwd: The passphrase, if any, associated with private key. """ s = FakeServer(instance, ssh_key_file) return SSHClient(s, host_key_file, user_name, ssh_pwd) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/manage/propget.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. def get(prop, choices=None): prompt = prop.verbose_name if not prompt: prompt = prop.name if choices: if callable(choices): choices = choices() else: choices = prop.get_choices() valid = False while not valid: if choices: min = 1 max = len(choices) for i in range(min, max+1): value = choices[i-1] if isinstance(value, tuple): value = value[0] print '[%d] %s' % (i, value) value = raw_input('%s [%d-%d]: ' % (prompt, min, max)) try: int_value = int(value) value = choices[int_value-1] if isinstance(value, tuple): value = value[1] valid = True except ValueError: print '%s is not a valid choice' % value except IndexError: print '%s is not within the range[%d-%d]' % (min, max) else: value = raw_input('%s: ' % prompt) try: value = prop.validate(value) if prop.empty(value) and prop.required: print 'A value is required' else: valid = True except: print 'Invalid value: %s' % value return value ================================================ FILE: deploy/third_party/boto-2.1.1/boto/manage/server.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ High-level abstraction of an EC2 server """ from __future__ import with_statement import boto.ec2 from boto.mashups.iobject import IObject from boto.pyami.config import BotoConfigPath, Config from boto.sdb.db.model import Model from boto.sdb.db.property import StringProperty, IntegerProperty, BooleanProperty, CalculatedProperty from boto.manage import propget from boto.ec2.zone import Zone from boto.ec2.keypair import KeyPair import os, time, StringIO from contextlib import closing from boto.exception import EC2ResponseError InstanceTypes = ['m1.small', 'm1.large', 'm1.xlarge', 'c1.medium', 'c1.xlarge', 'm2.2xlarge', 'm2.4xlarge'] class Bundler(object): def __init__(self, server, uname='root'): from boto.manage.cmdshell import SSHClient self.server = server self.uname = uname self.ssh_client = SSHClient(server, uname=uname) def copy_x509(self, key_file, cert_file): print '\tcopying cert and pk over to /mnt directory on server' self.ssh_client.open_sftp() path, name = os.path.split(key_file) self.remote_key_file = '/mnt/%s' % name self.ssh_client.put_file(key_file, self.remote_key_file) path, name = os.path.split(cert_file) self.remote_cert_file = '/mnt/%s' % name self.ssh_client.put_file(cert_file, self.remote_cert_file) print '...complete!' def bundle_image(self, prefix, size, ssh_key): command = "" if self.uname != 'root': command = "sudo " command += 'ec2-bundle-vol ' command += '-c %s -k %s ' % (self.remote_cert_file, self.remote_key_file) command += '-u %s ' % self.server._reservation.owner_id command += '-p %s ' % prefix command += '-s %d ' % size command += '-d /mnt ' if self.server.instance_type == 'm1.small' or self.server.instance_type == 'c1.medium': command += '-r i386' else: command += '-r x86_64' return command def upload_bundle(self, bucket, prefix, ssh_key): command = "" if self.uname != 'root': command = "sudo " command += 'ec2-upload-bundle ' command += '-m /mnt/%s.manifest.xml ' % prefix command += '-b %s ' % bucket command += '-a %s ' % self.server.ec2.aws_access_key_id command += '-s %s ' % self.server.ec2.aws_secret_access_key return command def bundle(self, bucket=None, prefix=None, key_file=None, cert_file=None, size=None, ssh_key=None, fp=None, clear_history=True): iobject = IObject() if not bucket: bucket = iobject.get_string('Name of S3 bucket') if not prefix: prefix = iobject.get_string('Prefix for AMI file') if not key_file: key_file = iobject.get_filename('Path to RSA private key file') if not cert_file: cert_file = iobject.get_filename('Path to RSA public cert file') if not size: size = iobject.get_int('Size (in MB) of bundled image') if not ssh_key: ssh_key = self.server.get_ssh_key_file() self.copy_x509(key_file, cert_file) if not fp: fp = StringIO.StringIO() fp.write('sudo mv %s /mnt/boto.cfg; ' % BotoConfigPath) fp.write('mv ~/.ssh/authorized_keys /mnt/authorized_keys; ') if clear_history: fp.write('history -c; ') fp.write(self.bundle_image(prefix, size, ssh_key)) fp.write('; ') fp.write(self.upload_bundle(bucket, prefix, ssh_key)) fp.write('; ') fp.write('sudo mv /mnt/boto.cfg %s; ' % BotoConfigPath) fp.write('mv /mnt/authorized_keys ~/.ssh/authorized_keys') command = fp.getvalue() print 'running the following command on the remote server:' print command t = self.ssh_client.run(command) print '\t%s' % t[0] print '\t%s' % t[1] print '...complete!' print 'registering image...' self.image_id = self.server.ec2.register_image(name=prefix, image_location='%s/%s.manifest.xml' % (bucket, prefix)) return self.image_id class CommandLineGetter(object): def get_ami_list(self): my_amis = [] for ami in self.ec2.get_all_images(): # hack alert, need a better way to do this! if ami.location.find('pyami') >= 0: my_amis.append((ami.location, ami)) return my_amis def get_region(self, params): region = params.get('region', None) if isinstance(region, str) or isinstance(region, unicode): region = boto.ec2.get_region(region) params['region'] = region if not region: prop = self.cls.find_property('region_name') params['region'] = propget.get(prop, choices=boto.ec2.regions) self.ec2 = params['region'].connect() def get_name(self, params): if not params.get('name', None): prop = self.cls.find_property('name') params['name'] = propget.get(prop) def get_description(self, params): if not params.get('description', None): prop = self.cls.find_property('description') params['description'] = propget.get(prop) def get_instance_type(self, params): if not params.get('instance_type', None): prop = StringProperty(name='instance_type', verbose_name='Instance Type', choices=InstanceTypes) params['instance_type'] = propget.get(prop) def get_quantity(self, params): if not params.get('quantity', None): prop = IntegerProperty(name='quantity', verbose_name='Number of Instances') params['quantity'] = propget.get(prop) def get_zone(self, params): if not params.get('zone', None): prop = StringProperty(name='zone', verbose_name='EC2 Availability Zone', choices=self.ec2.get_all_zones) params['zone'] = propget.get(prop) def get_ami_id(self, params): valid = False while not valid: ami = params.get('ami', None) if not ami: prop = StringProperty(name='ami', verbose_name='AMI') ami = propget.get(prop) try: rs = self.ec2.get_all_images([ami]) if len(rs) == 1: valid = True params['ami'] = rs[0] except EC2ResponseError: pass def get_group(self, params): group = params.get('group', None) if isinstance(group, str) or isinstance(group, unicode): group_list = self.ec2.get_all_security_groups() for g in group_list: if g.name == group: group = g params['group'] = g if not group: prop = StringProperty(name='group', verbose_name='EC2 Security Group', choices=self.ec2.get_all_security_groups) params['group'] = propget.get(prop) def get_key(self, params): keypair = params.get('keypair', None) if isinstance(keypair, str) or isinstance(keypair, unicode): key_list = self.ec2.get_all_key_pairs() for k in key_list: if k.name == keypair: keypair = k.name params['keypair'] = k.name if not keypair: prop = StringProperty(name='keypair', verbose_name='EC2 KeyPair', choices=self.ec2.get_all_key_pairs) params['keypair'] = propget.get(prop).name def get(self, cls, params): self.cls = cls self.get_region(params) self.ec2 = params['region'].connect() self.get_name(params) self.get_description(params) self.get_instance_type(params) self.get_zone(params) self.get_quantity(params) self.get_ami_id(params) self.get_group(params) self.get_key(params) class Server(Model): # # The properties of this object consists of real properties for data that # is not already stored in EC2 somewhere (e.g. name, description) plus # calculated properties for all of the properties that are already in # EC2 (e.g. hostname, security groups, etc.) # name = StringProperty(unique=True, verbose_name="Name") description = StringProperty(verbose_name="Description") region_name = StringProperty(verbose_name="EC2 Region Name") instance_id = StringProperty(verbose_name="EC2 Instance ID") elastic_ip = StringProperty(verbose_name="EC2 Elastic IP Address") production = BooleanProperty(verbose_name="Is This Server Production", default=False) ami_id = CalculatedProperty(verbose_name="AMI ID", calculated_type=str, use_method=True) zone = CalculatedProperty(verbose_name="Availability Zone Name", calculated_type=str, use_method=True) hostname = CalculatedProperty(verbose_name="Public DNS Name", calculated_type=str, use_method=True) private_hostname = CalculatedProperty(verbose_name="Private DNS Name", calculated_type=str, use_method=True) groups = CalculatedProperty(verbose_name="Security Groups", calculated_type=list, use_method=True) security_group = CalculatedProperty(verbose_name="Primary Security Group Name", calculated_type=str, use_method=True) key_name = CalculatedProperty(verbose_name="Key Name", calculated_type=str, use_method=True) instance_type = CalculatedProperty(verbose_name="Instance Type", calculated_type=str, use_method=True) status = CalculatedProperty(verbose_name="Current Status", calculated_type=str, use_method=True) launch_time = CalculatedProperty(verbose_name="Server Launch Time", calculated_type=str, use_method=True) console_output = CalculatedProperty(verbose_name="Console Output", calculated_type=file, use_method=True) packages = [] plugins = [] @classmethod def add_credentials(cls, cfg, aws_access_key_id, aws_secret_access_key): if not cfg.has_section('Credentials'): cfg.add_section('Credentials') cfg.set('Credentials', 'aws_access_key_id', aws_access_key_id) cfg.set('Credentials', 'aws_secret_access_key', aws_secret_access_key) if not cfg.has_section('DB_Server'): cfg.add_section('DB_Server') cfg.set('DB_Server', 'db_type', 'SimpleDB') cfg.set('DB_Server', 'db_name', cls._manager.domain.name) @classmethod def create(cls, config_file=None, logical_volume = None, cfg = None, **params): """ Create a new instance based on the specified configuration file or the specified configuration and the passed in parameters. If the config_file argument is not None, the configuration is read from there. Otherwise, the cfg argument is used. The config file may include other config files with a #import reference. The included config files must reside in the same directory as the specified file. The logical_volume argument, if supplied, will be used to get the current physical volume ID and use that as an override of the value specified in the config file. This may be useful for debugging purposes when you want to debug with a production config file but a test Volume. The dictionary argument may be used to override any EC2 configuration values in the config file. """ if config_file: cfg = Config(path=config_file) if cfg.has_section('EC2'): # include any EC2 configuration values that aren't specified in params: for option in cfg.options('EC2'): if option not in params: params[option] = cfg.get('EC2', option) getter = CommandLineGetter() getter.get(cls, params) region = params.get('region') ec2 = region.connect() cls.add_credentials(cfg, ec2.aws_access_key_id, ec2.aws_secret_access_key) ami = params.get('ami') kp = params.get('keypair') group = params.get('group') zone = params.get('zone') # deal with possibly passed in logical volume: if logical_volume != None: cfg.set('EBS', 'logical_volume_name', logical_volume.name) cfg_fp = StringIO.StringIO() cfg.write(cfg_fp) # deal with the possibility that zone and/or keypair are strings read from the config file: if isinstance(zone, Zone): zone = zone.name if isinstance(kp, KeyPair): kp = kp.name reservation = ami.run(min_count=1, max_count=params.get('quantity', 1), key_name=kp, security_groups=[group], instance_type=params.get('instance_type'), placement = zone, user_data = cfg_fp.getvalue()) l = [] i = 0 elastic_ip = params.get('elastic_ip') instances = reservation.instances if elastic_ip != None and instances.__len__() > 0: instance = instances[0] print 'Waiting for instance to start so we can set its elastic IP address...' # Sometimes we get a message from ec2 that says that the instance does not exist. # Hopefully the following delay will giv eec2 enough time to get to a stable state: time.sleep(5) while instance.update() != 'running': time.sleep(1) instance.use_ip(elastic_ip) print 'set the elastic IP of the first instance to %s' % elastic_ip for instance in instances: s = cls() s.ec2 = ec2 s.name = params.get('name') + '' if i==0 else str(i) s.description = params.get('description') s.region_name = region.name s.instance_id = instance.id if elastic_ip and i == 0: s.elastic_ip = elastic_ip s.put() l.append(s) i += 1 return l @classmethod def create_from_instance_id(cls, instance_id, name, description=''): regions = boto.ec2.regions() for region in regions: ec2 = region.connect() try: rs = ec2.get_all_instances([instance_id]) except: rs = [] if len(rs) == 1: s = cls() s.ec2 = ec2 s.name = name s.description = description s.region_name = region.name s.instance_id = instance_id s._reservation = rs[0] for instance in s._reservation.instances: if instance.id == instance_id: s._instance = instance s.put() return s return None @classmethod def create_from_current_instances(cls): servers = [] regions = boto.ec2.regions() for region in regions: ec2 = region.connect() rs = ec2.get_all_instances() for reservation in rs: for instance in reservation.instances: try: Server.find(instance_id=instance.id).next() boto.log.info('Server for %s already exists' % instance.id) except StopIteration: s = cls() s.ec2 = ec2 s.name = instance.id s.region_name = region.name s.instance_id = instance.id s._reservation = reservation s.put() servers.append(s) return servers def __init__(self, id=None, **kw): Model.__init__(self, id, **kw) self.ssh_key_file = None self.ec2 = None self._cmdshell = None self._reservation = None self._instance = None self._setup_ec2() def _setup_ec2(self): if self.ec2 and self._instance and self._reservation: return if self.id: if self.region_name: for region in boto.ec2.regions(): if region.name == self.region_name: self.ec2 = region.connect() if self.instance_id and not self._instance: try: rs = self.ec2.get_all_instances([self.instance_id]) if len(rs) >= 1: for instance in rs[0].instances: if instance.id == self.instance_id: self._reservation = rs[0] self._instance = instance except EC2ResponseError: pass def _status(self): status = '' if self._instance: self._instance.update() status = self._instance.state return status def _hostname(self): hostname = '' if self._instance: hostname = self._instance.public_dns_name return hostname def _private_hostname(self): hostname = '' if self._instance: hostname = self._instance.private_dns_name return hostname def _instance_type(self): it = '' if self._instance: it = self._instance.instance_type return it def _launch_time(self): lt = '' if self._instance: lt = self._instance.launch_time return lt def _console_output(self): co = '' if self._instance: co = self._instance.get_console_output() return co def _groups(self): gn = [] if self._reservation: gn = self._reservation.groups return gn def _security_group(self): groups = self._groups() if len(groups) >= 1: return groups[0].id return "" def _zone(self): zone = None if self._instance: zone = self._instance.placement return zone def _key_name(self): kn = None if self._instance: kn = self._instance.key_name return kn def put(self): Model.put(self) self._setup_ec2() def delete(self): if self.production: raise ValueError, "Can't delete a production server" #self.stop() Model.delete(self) def stop(self): if self.production: raise ValueError, "Can't delete a production server" if self._instance: self._instance.stop() def terminate(self): if self.production: raise ValueError, "Can't delete a production server" if self._instance: self._instance.terminate() def reboot(self): if self._instance: self._instance.reboot() def wait(self): while self.status != 'running': time.sleep(5) def get_ssh_key_file(self): if not self.ssh_key_file: ssh_dir = os.path.expanduser('~/.ssh') if os.path.isdir(ssh_dir): ssh_file = os.path.join(ssh_dir, '%s.pem' % self.key_name) if os.path.isfile(ssh_file): self.ssh_key_file = ssh_file if not self.ssh_key_file: iobject = IObject() self.ssh_key_file = iobject.get_filename('Path to OpenSSH Key file') return self.ssh_key_file def get_cmdshell(self): if not self._cmdshell: import cmdshell self.get_ssh_key_file() self._cmdshell = cmdshell.start(self) return self._cmdshell def reset_cmdshell(self): self._cmdshell = None def run(self, command): with closing(self.get_cmdshell()) as cmd: status = cmd.run(command) return status def get_bundler(self, uname='root'): self.get_ssh_key_file() return Bundler(self, uname) def get_ssh_client(self, uname='root', ssh_pwd=None): from boto.manage.cmdshell import SSHClient self.get_ssh_key_file() return SSHClient(self, uname=uname, ssh_pwd=ssh_pwd) def install(self, pkg): return self.run('apt-get -y install %s' % pkg) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/manage/task.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # import boto from boto.sdb.db.property import StringProperty, DateTimeProperty, IntegerProperty from boto.sdb.db.model import Model import datetime, subprocess, StringIO, time def check_hour(val): if val == '*': return if int(val) < 0 or int(val) > 23: raise ValueError class Task(Model): """ A scheduled, repeating task that can be executed by any participating servers. The scheduling is similar to cron jobs. Each task has an hour attribute. The allowable values for hour are [0-23|*]. To keep the operation reasonably efficient and not cause excessive polling, the minimum granularity of a Task is hourly. Some examples: hour='*' - the task would be executed each hour hour='3' - the task would be executed at 3AM GMT each day. """ name = StringProperty() hour = StringProperty(required=True, validator=check_hour, default='*') command = StringProperty(required=True) last_executed = DateTimeProperty() last_status = IntegerProperty() last_output = StringProperty() message_id = StringProperty() @classmethod def start_all(cls, queue_name): for task in cls.all(): task.start(queue_name) def __init__(self, id=None, **kw): Model.__init__(self, id, **kw) self.hourly = self.hour == '*' self.daily = self.hour != '*' self.now = datetime.datetime.utcnow() def check(self): """ Determine how long until the next scheduled time for a Task. Returns the number of seconds until the next scheduled time or zero if the task needs to be run immediately. If it's an hourly task and it's never been run, run it now. If it's a daily task and it's never been run and the hour is right, run it now. """ boto.log.info('checking Task[%s]-now=%s, last=%s' % (self.name, self.now, self.last_executed)) if self.hourly and not self.last_executed: return 0 if self.daily and not self.last_executed: if int(self.hour) == self.now.hour: return 0 else: return max( (int(self.hour)-self.now.hour), (self.now.hour-int(self.hour)) )*60*60 delta = self.now - self.last_executed if self.hourly: if delta.seconds >= 60*60: return 0 else: return 60*60 - delta.seconds else: if int(self.hour) == self.now.hour: if delta.days >= 1: return 0 else: return 82800 # 23 hours, just to be safe else: return max( (int(self.hour)-self.now.hour), (self.now.hour-int(self.hour)) )*60*60 def _run(self, msg, vtimeout): boto.log.info('Task[%s] - running:%s' % (self.name, self.command)) log_fp = StringIO.StringIO() process = subprocess.Popen(self.command, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) nsecs = 5 current_timeout = vtimeout while process.poll() == None: boto.log.info('nsecs=%s, timeout=%s' % (nsecs, current_timeout)) if nsecs >= current_timeout: current_timeout += vtimeout boto.log.info('Task[%s] - setting timeout to %d seconds' % (self.name, current_timeout)) if msg: msg.change_visibility(current_timeout) time.sleep(5) nsecs += 5 t = process.communicate() log_fp.write(t[0]) log_fp.write(t[1]) boto.log.info('Task[%s] - output: %s' % (self.name, log_fp.getvalue())) self.last_executed = self.now self.last_status = process.returncode self.last_output = log_fp.getvalue()[0:1023] def run(self, msg, vtimeout=60): delay = self.check() boto.log.info('Task[%s] - delay=%s seconds' % (self.name, delay)) if delay == 0: self._run(msg, vtimeout) queue = msg.queue new_msg = queue.new_message(self.id) new_msg = queue.write(new_msg) self.message_id = new_msg.id self.put() boto.log.info('Task[%s] - new message id=%s' % (self.name, new_msg.id)) msg.delete() boto.log.info('Task[%s] - deleted message %s' % (self.name, msg.id)) else: boto.log.info('new_vtimeout: %d' % delay) msg.change_visibility(delay) def start(self, queue_name): boto.log.info('Task[%s] - starting with queue: %s' % (self.name, queue_name)) queue = boto.lookup('sqs', queue_name) msg = queue.new_message(self.id) msg = queue.write(msg) self.message_id = msg.id self.put() boto.log.info('Task[%s] - start successful' % self.name) class TaskPoller(object): def __init__(self, queue_name): self.sqs = boto.connect_sqs() self.queue = self.sqs.lookup(queue_name) def poll(self, wait=60, vtimeout=60): while 1: m = self.queue.read(vtimeout) if m: task = Task.get_by_id(m.get_body()) if task: if not task.message_id or m.id == task.message_id: boto.log.info('Task[%s] - read message %s' % (task.name, m.id)) task.run(m, vtimeout) else: boto.log.info('Task[%s] - found extraneous message, ignoring' % task.name) else: time.sleep(wait) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/manage/test_manage.py ================================================ from boto.manage.server import Server from boto.manage.volume import Volume import time print '--> Creating New Volume' volume = Volume.create() print volume print '--> Creating New Server' server_list = Server.create() server = server_list[0] print server print '----> Waiting for Server to start up' while server.status != 'running': print '*' time.sleep(10) print '----> Server is running' print '--> Run "df -k" on Server' status = server.run('df -k') print status[1] print '--> Now run volume.make_ready to make the volume ready to use on server' volume.make_ready(server) print '--> Run "df -k" on Server' status = server.run('df -k') print status[1] print '--> Do an "ls -al" on the new filesystem' status = server.run('ls -al %s' % volume.mount_point) print status[1] ================================================ FILE: deploy/third_party/boto-2.1.1/boto/manage/volume.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from __future__ import with_statement from boto.sdb.db.model import Model from boto.sdb.db.property import StringProperty, IntegerProperty, ListProperty, ReferenceProperty, CalculatedProperty from boto.manage.server import Server from boto.manage import propget import boto.ec2 import time import traceback from contextlib import closing import dateutil.parser import datetime class CommandLineGetter(object): def get_region(self, params): if not params.get('region', None): prop = self.cls.find_property('region_name') params['region'] = propget.get(prop, choices=boto.ec2.regions) def get_zone(self, params): if not params.get('zone', None): prop = StringProperty(name='zone', verbose_name='EC2 Availability Zone', choices=self.ec2.get_all_zones) params['zone'] = propget.get(prop) def get_name(self, params): if not params.get('name', None): prop = self.cls.find_property('name') params['name'] = propget.get(prop) def get_size(self, params): if not params.get('size', None): prop = IntegerProperty(name='size', verbose_name='Size (GB)') params['size'] = propget.get(prop) def get_mount_point(self, params): if not params.get('mount_point', None): prop = self.cls.find_property('mount_point') params['mount_point'] = propget.get(prop) def get_device(self, params): if not params.get('device', None): prop = self.cls.find_property('device') params['device'] = propget.get(prop) def get(self, cls, params): self.cls = cls self.get_region(params) self.ec2 = params['region'].connect() self.get_zone(params) self.get_name(params) self.get_size(params) self.get_mount_point(params) self.get_device(params) class Volume(Model): name = StringProperty(required=True, unique=True, verbose_name='Name') region_name = StringProperty(required=True, verbose_name='EC2 Region') zone_name = StringProperty(required=True, verbose_name='EC2 Zone') mount_point = StringProperty(verbose_name='Mount Point') device = StringProperty(verbose_name="Device Name", default='/dev/sdp') volume_id = StringProperty(required=True) past_volume_ids = ListProperty(item_type=str) server = ReferenceProperty(Server, collection_name='volumes', verbose_name='Server Attached To') volume_state = CalculatedProperty(verbose_name="Volume State", calculated_type=str, use_method=True) attachment_state = CalculatedProperty(verbose_name="Attachment State", calculated_type=str, use_method=True) size = CalculatedProperty(verbose_name="Size (GB)", calculated_type=int, use_method=True) @classmethod def create(cls, **params): getter = CommandLineGetter() getter.get(cls, params) region = params.get('region') ec2 = region.connect() zone = params.get('zone') size = params.get('size') ebs_volume = ec2.create_volume(size, zone.name) v = cls() v.ec2 = ec2 v.volume_id = ebs_volume.id v.name = params.get('name') v.mount_point = params.get('mount_point') v.device = params.get('device') v.region_name = region.name v.zone_name = zone.name v.put() return v @classmethod def create_from_volume_id(cls, region_name, volume_id, name): vol = None ec2 = boto.ec2.connect_to_region(region_name) rs = ec2.get_all_volumes([volume_id]) if len(rs) == 1: v = rs[0] vol = cls() vol.volume_id = v.id vol.name = name vol.region_name = v.region.name vol.zone_name = v.zone vol.put() return vol def create_from_latest_snapshot(self, name, size=None): snapshot = self.get_snapshots()[-1] return self.create_from_snapshot(name, snapshot, size) def create_from_snapshot(self, name, snapshot, size=None): if size < self.size: size = self.size ec2 = self.get_ec2_connection() if self.zone_name == None or self.zone_name == '': # deal with the migration case where the zone is not set in the logical volume: current_volume = ec2.get_all_volumes([self.volume_id])[0] self.zone_name = current_volume.zone ebs_volume = ec2.create_volume(size, self.zone_name, snapshot) v = Volume() v.ec2 = self.ec2 v.volume_id = ebs_volume.id v.name = name v.mount_point = self.mount_point v.device = self.device v.region_name = self.region_name v.zone_name = self.zone_name v.put() return v def get_ec2_connection(self): if self.server: return self.server.ec2 if not hasattr(self, 'ec2') or self.ec2 == None: self.ec2 = boto.ec2.connect_to_region(self.region_name) return self.ec2 def _volume_state(self): ec2 = self.get_ec2_connection() rs = ec2.get_all_volumes([self.volume_id]) return rs[0].volume_state() def _attachment_state(self): ec2 = self.get_ec2_connection() rs = ec2.get_all_volumes([self.volume_id]) return rs[0].attachment_state() def _size(self): if not hasattr(self, '__size'): ec2 = self.get_ec2_connection() rs = ec2.get_all_volumes([self.volume_id]) self.__size = rs[0].size return self.__size def install_xfs(self): if self.server: self.server.install('xfsprogs xfsdump') def get_snapshots(self): """ Returns a list of all completed snapshots for this volume ID. """ ec2 = self.get_ec2_connection() rs = ec2.get_all_snapshots() all_vols = [self.volume_id] + self.past_volume_ids snaps = [] for snapshot in rs: if snapshot.volume_id in all_vols: if snapshot.progress == '100%': snapshot.date = dateutil.parser.parse(snapshot.start_time) snapshot.keep = True snaps.append(snapshot) snaps.sort(cmp=lambda x,y: cmp(x.date, y.date)) return snaps def attach(self, server=None): if self.attachment_state == 'attached': print 'already attached' return None if server: self.server = server self.put() ec2 = self.get_ec2_connection() ec2.attach_volume(self.volume_id, self.server.instance_id, self.device) def detach(self, force=False): state = self.attachment_state if state == 'available' or state == None or state == 'detaching': print 'already detached' return None ec2 = self.get_ec2_connection() ec2.detach_volume(self.volume_id, self.server.instance_id, self.device, force) self.server = None self.put() def checkfs(self, use_cmd=None): if self.server == None: raise ValueError, 'server attribute must be set to run this command' # detemine state of file system on volume, only works if attached if use_cmd: cmd = use_cmd else: cmd = self.server.get_cmdshell() status = cmd.run('xfs_check %s' % self.device) if not use_cmd: cmd.close() if status[1].startswith('bad superblock magic number 0'): return False return True def wait(self): if self.server == None: raise ValueError, 'server attribute must be set to run this command' with closing(self.server.get_cmdshell()) as cmd: # wait for the volume device to appear cmd = self.server.get_cmdshell() while not cmd.exists(self.device): boto.log.info('%s still does not exist, waiting 10 seconds' % self.device) time.sleep(10) def format(self): if self.server == None: raise ValueError, 'server attribute must be set to run this command' status = None with closing(self.server.get_cmdshell()) as cmd: if not self.checkfs(cmd): boto.log.info('make_fs...') status = cmd.run('mkfs -t xfs %s' % self.device) return status def mount(self): if self.server == None: raise ValueError, 'server attribute must be set to run this command' boto.log.info('handle_mount_point') with closing(self.server.get_cmdshell()) as cmd: cmd = self.server.get_cmdshell() if not cmd.isdir(self.mount_point): boto.log.info('making directory') # mount directory doesn't exist so create it cmd.run("mkdir %s" % self.mount_point) else: boto.log.info('directory exists already') status = cmd.run('mount -l') lines = status[1].split('\n') for line in lines: t = line.split() if t and t[2] == self.mount_point: # something is already mounted at the mount point # unmount that and mount it as /tmp if t[0] != self.device: cmd.run('umount %s' % self.mount_point) cmd.run('mount %s /tmp' % t[0]) cmd.run('chmod 777 /tmp') break # Mount up our new EBS volume onto mount_point cmd.run("mount %s %s" % (self.device, self.mount_point)) cmd.run('xfs_growfs %s' % self.mount_point) def make_ready(self, server): self.server = server self.put() self.install_xfs() self.attach() self.wait() self.format() self.mount() def freeze(self): if self.server: return self.server.run("/usr/sbin/xfs_freeze -f %s" % self.mount_point) def unfreeze(self): if self.server: return self.server.run("/usr/sbin/xfs_freeze -u %s" % self.mount_point) def snapshot(self): # if this volume is attached to a server # we need to freeze the XFS file system try: self.freeze() if self.server == None: snapshot = self.get_ec2_connection().create_snapshot(self.volume_id) else: snapshot = self.server.ec2.create_snapshot(self.volume_id) boto.log.info('Snapshot of Volume %s created: %s' % (self.name, snapshot)) except Exception: boto.log.info('Snapshot error') boto.log.info(traceback.format_exc()) finally: status = self.unfreeze() return status def get_snapshot_range(self, snaps, start_date=None, end_date=None): l = [] for snap in snaps: if start_date and end_date: if snap.date >= start_date and snap.date <= end_date: l.append(snap) elif start_date: if snap.date >= start_date: l.append(snap) elif end_date: if snap.date <= end_date: l.append(snap) else: l.append(snap) return l def trim_snapshots(self, delete=False): """ Trim the number of snapshots for this volume. This method always keeps the oldest snapshot. It then uses the parameters passed in to determine how many others should be kept. The algorithm is to keep all snapshots from the current day. Then it will keep the first snapshot of the day for the previous seven days. Then, it will keep the first snapshot of the week for the previous four weeks. After than, it will keep the first snapshot of the month for as many months as there are. """ snaps = self.get_snapshots() # Always keep the oldest and the newest if len(snaps) <= 2: return snaps snaps = snaps[1:-1] now = datetime.datetime.now(snaps[0].date.tzinfo) midnight = datetime.datetime(year=now.year, month=now.month, day=now.day, tzinfo=now.tzinfo) # Keep the first snapshot from each day of the previous week one_week = datetime.timedelta(days=7, seconds=60*60) print midnight-one_week, midnight previous_week = self.get_snapshot_range(snaps, midnight-one_week, midnight) print previous_week if not previous_week: return snaps current_day = None for snap in previous_week: if current_day and current_day == snap.date.day: snap.keep = False else: current_day = snap.date.day # Get ourselves onto the next full week boundary if previous_week: week_boundary = previous_week[0].date if week_boundary.weekday() != 0: delta = datetime.timedelta(days=week_boundary.weekday()) week_boundary = week_boundary - delta # Keep one within this partial week partial_week = self.get_snapshot_range(snaps, week_boundary, previous_week[0].date) if len(partial_week) > 1: for snap in partial_week[1:]: snap.keep = False # Keep the first snapshot of each week for the previous 4 weeks for i in range(0,4): weeks_worth = self.get_snapshot_range(snaps, week_boundary-one_week, week_boundary) if len(weeks_worth) > 1: for snap in weeks_worth[1:]: snap.keep = False week_boundary = week_boundary - one_week # Now look through all remaining snaps and keep one per month remainder = self.get_snapshot_range(snaps, end_date=week_boundary) current_month = None for snap in remainder: if current_month and current_month == snap.date.month: snap.keep = False else: current_month = snap.date.month if delete: for snap in snaps: if not snap.keep: boto.log.info('Deleting %s(%s) for %s' % (snap, snap.date, self.name)) snap.delete() return snaps def grow(self, size): pass def copy(self, snapshot): pass def get_snapshot_from_date(self, date): pass def delete(self, delete_ebs_volume=False): if delete_ebs_volume: self.detach() ec2 = self.get_ec2_connection() ec2.delete_volume(self.volume_id) Model.delete(self) def archive(self): # snapshot volume, trim snaps, delete volume-id pass ================================================ FILE: deploy/third_party/boto-2.1.1/boto/mashups/__init__.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # ================================================ FILE: deploy/third_party/boto-2.1.1/boto/mashups/interactive.py ================================================ # Copyright (C) 2003-2007 Robey Pointer # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # # Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License # along with Paramiko; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. import socket import sys # windows does not have termios... try: import termios import tty has_termios = True except ImportError: has_termios = False def interactive_shell(chan): if has_termios: posix_shell(chan) else: windows_shell(chan) def posix_shell(chan): import select oldtty = termios.tcgetattr(sys.stdin) try: tty.setraw(sys.stdin.fileno()) tty.setcbreak(sys.stdin.fileno()) chan.settimeout(0.0) while True: r, w, e = select.select([chan, sys.stdin], [], []) if chan in r: try: x = chan.recv(1024) if len(x) == 0: print '\r\n*** EOF\r\n', break sys.stdout.write(x) sys.stdout.flush() except socket.timeout: pass if sys.stdin in r: x = sys.stdin.read(1) if len(x) == 0: break chan.send(x) finally: termios.tcsetattr(sys.stdin, termios.TCSADRAIN, oldtty) # thanks to Mike Looijmans for this code def windows_shell(chan): import threading sys.stdout.write("Line-buffered terminal emulation. Press F6 or ^Z to send EOF.\r\n\r\n") def writeall(sock): while True: data = sock.recv(256) if not data: sys.stdout.write('\r\n*** EOF ***\r\n\r\n') sys.stdout.flush() break sys.stdout.write(data) sys.stdout.flush() writer = threading.Thread(target=writeall, args=(chan,)) writer.start() try: while True: d = sys.stdin.read(1) if not d: break chan.send(d) except EOFError: # user hit ^Z or F6 pass ================================================ FILE: deploy/third_party/boto-2.1.1/boto/mashups/iobject.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import os def int_val_fn(v): try: int(v) return True except: return False class IObject(object): def choose_from_list(self, item_list, search_str='', prompt='Enter Selection'): if not item_list: print 'No Choices Available' return choice = None while not choice: n = 1 choices = [] for item in item_list: if isinstance(item, basestring): print '[%d] %s' % (n, item) choices.append(item) n += 1 else: obj, id, desc = item if desc: if desc.find(search_str) >= 0: print '[%d] %s - %s' % (n, id, desc) choices.append(obj) n += 1 else: if id.find(search_str) >= 0: print '[%d] %s' % (n, id) choices.append(obj) n += 1 if choices: val = raw_input('%s[1-%d]: ' % (prompt, len(choices))) if val.startswith('/'): search_str = val[1:] else: try: int_val = int(val) if int_val == 0: return None choice = choices[int_val-1] except ValueError: print '%s is not a valid choice' % val except IndexError: print '%s is not within the range[1-%d]' % (val, len(choices)) else: print "No objects matched your pattern" search_str = '' return choice def get_string(self, prompt, validation_fn=None): okay = False while not okay: val = raw_input('%s: ' % prompt) if validation_fn: okay = validation_fn(val) if not okay: print 'Invalid value: %s' % val else: okay = True return val def get_filename(self, prompt): okay = False val = '' while not okay: val = raw_input('%s: %s' % (prompt, val)) val = os.path.expanduser(val) if os.path.isfile(val): okay = True elif os.path.isdir(val): path = val val = self.choose_from_list(os.listdir(path)) if val: val = os.path.join(path, val) okay = True else: val = '' else: print 'Invalid value: %s' % val val = '' return val def get_int(self, prompt): s = self.get_string(prompt, int_val_fn) return int(s) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/mashups/order.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ High-level abstraction of an EC2 order for servers """ import boto import boto.ec2 from boto.mashups.server import Server, ServerSet from boto.mashups.iobject import IObject from boto.pyami.config import Config from boto.sdb.persist import get_domain, set_domain import time, StringIO InstanceTypes = ['m1.small', 'm1.large', 'm1.xlarge', 'c1.medium', 'c1.xlarge'] class Item(IObject): def __init__(self): self.region = None self.name = None self.instance_type = None self.quantity = 0 self.zone = None self.ami = None self.groups = [] self.key = None self.ec2 = None self.config = None def set_userdata(self, key, value): self.userdata[key] = value def get_userdata(self, key): return self.userdata[key] def set_region(self, region=None): if region: self.region = region else: l = [(r, r.name, r.endpoint) for r in boto.ec2.regions()] self.region = self.choose_from_list(l, prompt='Choose Region') def set_name(self, name=None): if name: self.name = name else: self.name = self.get_string('Name') def set_instance_type(self, instance_type=None): if instance_type: self.instance_type = instance_type else: self.instance_type = self.choose_from_list(InstanceTypes, 'Instance Type') def set_quantity(self, n=0): if n > 0: self.quantity = n else: self.quantity = self.get_int('Quantity') def set_zone(self, zone=None): if zone: self.zone = zone else: l = [(z, z.name, z.state) for z in self.ec2.get_all_zones()] self.zone = self.choose_from_list(l, prompt='Choose Availability Zone') def set_ami(self, ami=None): if ami: self.ami = ami else: l = [(a, a.id, a.location) for a in self.ec2.get_all_images()] self.ami = self.choose_from_list(l, prompt='Choose AMI') def add_group(self, group=None): if group: self.groups.append(group) else: l = [(s, s.name, s.description) for s in self.ec2.get_all_security_groups()] self.groups.append(self.choose_from_list(l, prompt='Choose Security Group')) def set_key(self, key=None): if key: self.key = key else: l = [(k, k.name, '') for k in self.ec2.get_all_key_pairs()] self.key = self.choose_from_list(l, prompt='Choose Keypair') def update_config(self): if not self.config.has_section('Credentials'): self.config.add_section('Credentials') self.config.set('Credentials', 'aws_access_key_id', self.ec2.aws_access_key_id) self.config.set('Credentials', 'aws_secret_access_key', self.ec2.aws_secret_access_key) if not self.config.has_section('Pyami'): self.config.add_section('Pyami') sdb_domain = get_domain() if sdb_domain: self.config.set('Pyami', 'server_sdb_domain', sdb_domain) self.config.set('Pyami', 'server_sdb_name', self.name) def set_config(self, config_path=None): if not config_path: config_path = self.get_filename('Specify Config file') self.config = Config(path=config_path) def get_userdata_string(self): s = StringIO.StringIO() self.config.write(s) return s.getvalue() def enter(self, **params): self.region = params.get('region', self.region) if not self.region: self.set_region() self.ec2 = self.region.connect() self.name = params.get('name', self.name) if not self.name: self.set_name() self.instance_type = params.get('instance_type', self.instance_type) if not self.instance_type: self.set_instance_type() self.zone = params.get('zone', self.zone) if not self.zone: self.set_zone() self.quantity = params.get('quantity', self.quantity) if not self.quantity: self.set_quantity() self.ami = params.get('ami', self.ami) if not self.ami: self.set_ami() self.groups = params.get('groups', self.groups) if not self.groups: self.add_group() self.key = params.get('key', self.key) if not self.key: self.set_key() self.config = params.get('config', self.config) if not self.config: self.set_config() self.update_config() class Order(IObject): def __init__(self): self.items = [] self.reservation = None def add_item(self, **params): item = Item() item.enter(**params) self.items.append(item) def display(self): print 'This Order consists of the following items' print print 'QTY\tNAME\tTYPE\nAMI\t\tGroups\t\t\tKeyPair' for item in self.items: print '%s\t%s\t%s\t%s\t%s\t%s' % (item.quantity, item.name, item.instance_type, item.ami.id, item.groups, item.key.name) def place(self, block=True): if get_domain() == None: print 'SDB Persistence Domain not set' domain_name = self.get_string('Specify SDB Domain') set_domain(domain_name) s = ServerSet() for item in self.items: r = item.ami.run(min_count=1, max_count=item.quantity, key_name=item.key.name, user_data=item.get_userdata_string(), security_groups=item.groups, instance_type=item.instance_type, placement=item.zone.name) if block: states = [i.state for i in r.instances] if states.count('running') != len(states): print states time.sleep(15) states = [i.update() for i in r.instances] for i in r.instances: server = Server() server.name = item.name server.instance_id = i.id server.reservation = r server.save() s.append(server) if len(s) == 1: return s[0] else: return s ================================================ FILE: deploy/third_party/boto-2.1.1/boto/mashups/server.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ High-level abstraction of an EC2 server """ import boto import boto.utils from boto.mashups.iobject import IObject from boto.pyami.config import Config, BotoConfigPath from boto.mashups.interactive import interactive_shell from boto.sdb.db.model import Model from boto.sdb.db.property import StringProperty import os import StringIO class ServerSet(list): def __getattr__(self, name): results = [] is_callable = False for server in self: try: val = getattr(server, name) if callable(val): is_callable = True results.append(val) except: results.append(None) if is_callable: self.map_list = results return self.map return results def map(self, *args): results = [] for fn in self.map_list: results.append(fn(*args)) return results class Server(Model): @property def ec2(self): if self._ec2 is None: self._ec2 = boto.connect_ec2() return self._ec2 @classmethod def Inventory(cls): """ Returns a list of Server instances, one for each Server object persisted in the db """ l = ServerSet() rs = cls.find() for server in rs: l.append(server) return l @classmethod def Register(cls, name, instance_id, description=''): s = cls() s.name = name s.instance_id = instance_id s.description = description s.save() return s def __init__(self, id=None, **kw): Model.__init__(self, id, **kw) self._reservation = None self._instance = None self._ssh_client = None self._pkey = None self._config = None self._ec2 = None name = StringProperty(unique=True, verbose_name="Name") instance_id = StringProperty(verbose_name="Instance ID") config_uri = StringProperty() ami_id = StringProperty(verbose_name="AMI ID") zone = StringProperty(verbose_name="Availability Zone") security_group = StringProperty(verbose_name="Security Group", default="default") key_name = StringProperty(verbose_name="Key Name") elastic_ip = StringProperty(verbose_name="Elastic IP") instance_type = StringProperty(verbose_name="Instance Type") description = StringProperty(verbose_name="Description") log = StringProperty() def setReadOnly(self, value): raise AttributeError def getInstance(self): if not self._instance: if self.instance_id: try: rs = self.ec2.get_all_instances([self.instance_id]) except: return None if len(rs) > 0: self._reservation = rs[0] self._instance = self._reservation.instances[0] return self._instance instance = property(getInstance, setReadOnly, None, 'The Instance for the server') def getAMI(self): if self.instance: return self.instance.image_id ami = property(getAMI, setReadOnly, None, 'The AMI for the server') def getStatus(self): if self.instance: self.instance.update() return self.instance.state status = property(getStatus, setReadOnly, None, 'The status of the server') def getHostname(self): if self.instance: return self.instance.public_dns_name hostname = property(getHostname, setReadOnly, None, 'The public DNS name of the server') def getPrivateHostname(self): if self.instance: return self.instance.private_dns_name private_hostname = property(getPrivateHostname, setReadOnly, None, 'The private DNS name of the server') def getLaunchTime(self): if self.instance: return self.instance.launch_time launch_time = property(getLaunchTime, setReadOnly, None, 'The time the Server was started') def getConsoleOutput(self): if self.instance: return self.instance.get_console_output() console_output = property(getConsoleOutput, setReadOnly, None, 'Retrieve the console output for server') def getGroups(self): if self._reservation: return self._reservation.groups else: return None groups = property(getGroups, setReadOnly, None, 'The Security Groups controlling access to this server') def getConfig(self): if not self._config: remote_file = BotoConfigPath local_file = '%s.ini' % self.instance.id self.get_file(remote_file, local_file) self._config = Config(local_file) return self._config def setConfig(self, config): local_file = '%s.ini' % self.instance.id fp = open(local_file) config.write(fp) fp.close() self.put_file(local_file, BotoConfigPath) self._config = config config = property(getConfig, setConfig, None, 'The instance data for this server') def set_config(self, config): """ Set SDB based config """ self._config = config self._config.dump_to_sdb("botoConfigs", self.id) def load_config(self): self._config = Config(do_load=False) self._config.load_from_sdb("botoConfigs", self.id) def stop(self): if self.instance: self.instance.stop() def start(self): self.stop() ec2 = boto.connect_ec2() ami = ec2.get_all_images(image_ids = [str(self.ami_id)])[0] groups = ec2.get_all_security_groups(groupnames=[str(self.security_group)]) if not self._config: self.load_config() if not self._config.has_section("Credentials"): self._config.add_section("Credentials") self._config.set("Credentials", "aws_access_key_id", ec2.aws_access_key_id) self._config.set("Credentials", "aws_secret_access_key", ec2.aws_secret_access_key) if not self._config.has_section("Pyami"): self._config.add_section("Pyami") if self._manager.domain: self._config.set('Pyami', 'server_sdb_domain', self._manager.domain.name) self._config.set("Pyami", 'server_sdb_name', self.name) cfg = StringIO.StringIO() self._config.write(cfg) cfg = cfg.getvalue() r = ami.run(min_count=1, max_count=1, key_name=self.key_name, security_groups = groups, instance_type = self.instance_type, placement = self.zone, user_data = cfg) i = r.instances[0] self.instance_id = i.id self.put() if self.elastic_ip: ec2.associate_address(self.instance_id, self.elastic_ip) def reboot(self): if self.instance: self.instance.reboot() def get_ssh_client(self, key_file=None, host_key_file='~/.ssh/known_hosts', uname='root'): import paramiko if not self.instance: print 'No instance yet!' return if not self._ssh_client: if not key_file: iobject = IObject() key_file = iobject.get_filename('Path to OpenSSH Key file') self._pkey = paramiko.RSAKey.from_private_key_file(key_file) self._ssh_client = paramiko.SSHClient() self._ssh_client.load_system_host_keys() self._ssh_client.load_host_keys(os.path.expanduser(host_key_file)) self._ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self._ssh_client.connect(self.instance.public_dns_name, username=uname, pkey=self._pkey) return self._ssh_client def get_file(self, remotepath, localpath): ssh_client = self.get_ssh_client() sftp_client = ssh_client.open_sftp() sftp_client.get(remotepath, localpath) def put_file(self, localpath, remotepath): ssh_client = self.get_ssh_client() sftp_client = ssh_client.open_sftp() sftp_client.put(localpath, remotepath) def listdir(self, remotepath): ssh_client = self.get_ssh_client() sftp_client = ssh_client.open_sftp() return sftp_client.listdir(remotepath) def shell(self, key_file=None): ssh_client = self.get_ssh_client(key_file) channel = ssh_client.invoke_shell() interactive_shell(channel) def bundle_image(self, prefix, key_file, cert_file, size): print 'bundling image...' print '\tcopying cert and pk over to /mnt directory on server' ssh_client = self.get_ssh_client() sftp_client = ssh_client.open_sftp() path, name = os.path.split(key_file) remote_key_file = '/mnt/%s' % name self.put_file(key_file, remote_key_file) path, name = os.path.split(cert_file) remote_cert_file = '/mnt/%s' % name self.put_file(cert_file, remote_cert_file) print '\tdeleting %s' % BotoConfigPath # delete the metadata.ini file if it exists try: sftp_client.remove(BotoConfigPath) except: pass command = 'sudo ec2-bundle-vol ' command += '-c %s -k %s ' % (remote_cert_file, remote_key_file) command += '-u %s ' % self._reservation.owner_id command += '-p %s ' % prefix command += '-s %d ' % size command += '-d /mnt ' if self.instance.instance_type == 'm1.small' or self.instance_type == 'c1.medium': command += '-r i386' else: command += '-r x86_64' print '\t%s' % command t = ssh_client.exec_command(command) response = t[1].read() print '\t%s' % response print '\t%s' % t[2].read() print '...complete!' def upload_bundle(self, bucket, prefix): print 'uploading bundle...' command = 'ec2-upload-bundle ' command += '-m /mnt/%s.manifest.xml ' % prefix command += '-b %s ' % bucket command += '-a %s ' % self.ec2.aws_access_key_id command += '-s %s ' % self.ec2.aws_secret_access_key print '\t%s' % command ssh_client = self.get_ssh_client() t = ssh_client.exec_command(command) response = t[1].read() print '\t%s' % response print '\t%s' % t[2].read() print '...complete!' def create_image(self, bucket=None, prefix=None, key_file=None, cert_file=None, size=None): iobject = IObject() if not bucket: bucket = iobject.get_string('Name of S3 bucket') if not prefix: prefix = iobject.get_string('Prefix for AMI file') if not key_file: key_file = iobject.get_filename('Path to RSA private key file') if not cert_file: cert_file = iobject.get_filename('Path to RSA public cert file') if not size: size = iobject.get_int('Size (in MB) of bundled image') self.bundle_image(prefix, key_file, cert_file, size) self.upload_bundle(bucket, prefix) print 'registering image...' self.image_id = self.ec2.register_image('%s/%s.manifest.xml' % (bucket, prefix)) return self.image_id def attach_volume(self, volume, device="/dev/sdp"): """ Attach an EBS volume to this server :param volume: EBS Volume to attach :type volume: boto.ec2.volume.Volume :param device: Device to attach to (default to /dev/sdp) :type device: string """ if hasattr(volume, "id"): volume_id = volume.id else: volume_id = volume return self.ec2.attach_volume(volume_id=volume_id, instance_id=self.instance_id, device=device) def detach_volume(self, volume): """ Detach an EBS volume from this server :param volume: EBS Volume to detach :type volume: boto.ec2.volume.Volume """ if hasattr(volume, "id"): volume_id = volume.id else: volume_id = volume return self.ec2.detach_volume(volume_id=volume_id, instance_id=self.instance_id) def install_package(self, package_name): print 'installing %s...' % package_name command = 'yum -y install %s' % package_name print '\t%s' % command ssh_client = self.get_ssh_client() t = ssh_client.exec_command(command) response = t[1].read() print '\t%s' % response print '\t%s' % t[2].read() print '...complete!' ================================================ FILE: deploy/third_party/boto-2.1.1/boto/mturk/__init__.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # ================================================ FILE: deploy/third_party/boto-2.1.1/boto/mturk/connection.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import xml.sax import datetime import itertools from boto import handler from boto import config from boto.mturk.price import Price import boto.mturk.notification from boto.connection import AWSQueryConnection from boto.exception import EC2ResponseError from boto.resultset import ResultSet from boto.mturk.question import QuestionForm, ExternalQuestion class MTurkRequestError(EC2ResponseError): "Error for MTurk Requests" # todo: subclass from an abstract parent of EC2ResponseError class MTurkConnection(AWSQueryConnection): APIVersion = '2008-08-02' def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, host=None, debug=0, https_connection_factory=None): if not host: if config.has_option('MTurk', 'sandbox') and config.get('MTurk', 'sandbox') == 'True': host = 'mechanicalturk.sandbox.amazonaws.com' else: host = 'mechanicalturk.amazonaws.com' AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, host, debug, https_connection_factory) def _required_auth_capability(self): return ['mturk'] def get_account_balance(self): """ """ params = {} return self._process_request('GetAccountBalance', params, [('AvailableBalance', Price), ('OnHoldBalance', Price)]) def register_hit_type(self, title, description, reward, duration, keywords=None, approval_delay=None, qual_req=None): """ Register a new HIT Type title, description are strings reward is a Price object duration can be a timedelta, or an object castable to an int """ params = dict( Title=title, Description=description, AssignmentDurationInSeconds= self.duration_as_seconds(duration), ) params.update(MTurkConnection.get_price_as_price(reward).get_as_params('Reward')) if keywords: params['Keywords'] = self.get_keywords_as_string(keywords) if approval_delay is not None: d = self.duration_as_seconds(approval_delay) params['AutoApprovalDelayInSeconds'] = d if qual_req is not None: params.update(qual_req.get_as_params()) return self._process_request('RegisterHITType', params) def set_email_notification(self, hit_type, email, event_types=None): """ Performs a SetHITTypeNotification operation to set email notification for a specified HIT type """ return self._set_notification(hit_type, 'Email', email, event_types) def set_rest_notification(self, hit_type, url, event_types=None): """ Performs a SetHITTypeNotification operation to set REST notification for a specified HIT type """ return self._set_notification(hit_type, 'REST', url, event_types) def _set_notification(self, hit_type, transport, destination, event_types=None): """ Common SetHITTypeNotification operation to set notification for a specified HIT type """ assert type(hit_type) is str, "hit_type argument should be a string." params = {'HITTypeId': hit_type} # from the Developer Guide: # The 'Active' parameter is optional. If omitted, the active status of # the HIT type's notification specification is unchanged. All HIT types # begin with their notification specifications in the "inactive" status. notification_params = {'Destination': destination, 'Transport': transport, 'Version': boto.mturk.notification.NotificationMessage.NOTIFICATION_VERSION, 'Active': True, } # add specific event types if required if event_types: self.build_list_params(notification_params, event_types, 'EventType') # Set up dict of 'Notification.1.Transport' etc. values notification_rest_params = {} num = 1 for key in notification_params: notification_rest_params['Notification.%d.%s' % (num, key)] = notification_params[key] # Update main params dict params.update(notification_rest_params) # Execute operation return self._process_request('SetHITTypeNotification', params) def create_hit(self, hit_type=None, question=None, lifetime=datetime.timedelta(days=7), max_assignments=1, title=None, description=None, keywords=None, reward=None, duration=datetime.timedelta(days=7), approval_delay=None, annotation=None, questions=None, qualifications=None, response_groups=None): """ Creates a new HIT. Returns a ResultSet See: http://docs.amazonwebservices.com/AWSMechanicalTurkRequester/2006-10-31/ApiReference_CreateHITOperation.html """ # handle single or multiple questions neither = question is None and questions is None both = question is not None and questions is not None if neither or both: raise ValueError("Must specify either question (single Question instance) or questions (list or QuestionForm instance), but not both") if question: questions = [question] question_param = QuestionForm(questions) if isinstance(question, QuestionForm): question_param = question elif isinstance(question, ExternalQuestion): question_param = question # Handle basic required arguments and set up params dict params = {'Question': question_param.get_as_xml(), 'LifetimeInSeconds' : self.duration_as_seconds(lifetime), 'MaxAssignments' : max_assignments, } # if hit type specified then add it # else add the additional required parameters if hit_type: params['HITTypeId'] = hit_type else: # Handle keywords final_keywords = MTurkConnection.get_keywords_as_string(keywords) # Handle price argument final_price = MTurkConnection.get_price_as_price(reward) final_duration = self.duration_as_seconds(duration) additional_params = dict( Title=title, Description=description, Keywords=final_keywords, AssignmentDurationInSeconds=final_duration, ) additional_params.update(final_price.get_as_params('Reward')) if approval_delay is not None: d = self.duration_as_seconds(approval_delay) additional_params['AutoApprovalDelayInSeconds'] = d # add these params to the others params.update(additional_params) # add the annotation if specified if annotation is not None: params['RequesterAnnotation'] = annotation # Add the Qualifications if specified if qualifications is not None: params.update(qualifications.get_as_params()) # Handle optional response groups argument if response_groups: self.build_list_params(params, response_groups, 'ResponseGroup') # Submit return self._process_request('CreateHIT', params, [('HIT', HIT),]) def change_hit_type_of_hit(self, hit_id, hit_type): """ Change the HIT type of an existing HIT. Note that the reward associated with the new HIT type must match the reward of the current HIT type in order for the operation to be valid. :type hit_id: str :type hit_type: str """ params = {'HITId' : hit_id, 'HITTypeId': hit_type} return self._process_request('ChangeHITTypeOfHIT', params) def get_reviewable_hits(self, hit_type=None, status='Reviewable', sort_by='Expiration', sort_direction='Ascending', page_size=10, page_number=1): """ Retrieve the HITs that have a status of Reviewable, or HITs that have a status of Reviewing, and that belong to the Requester calling the operation. """ params = {'Status' : status, 'SortProperty' : sort_by, 'SortDirection' : sort_direction, 'PageSize' : page_size, 'PageNumber' : page_number} # Handle optional hit_type argument if hit_type is not None: params.update({'HITTypeId': hit_type}) return self._process_request('GetReviewableHITs', params, [('HIT', HIT),]) @staticmethod def _get_pages(page_size, total_records): """ Given a page size (records per page) and a total number of records, return the page numbers to be retrieved. """ pages = total_records/page_size+bool(total_records%page_size) return range(1, pages+1) def get_all_hits(self): """ Return all of a Requester's HITs Despite what search_hits says, it does not return all hits, but instead returns a page of hits. This method will pull the hits from the server 100 at a time, but will yield the results iteratively, so subsequent requests are made on demand. """ page_size = 100 search_rs = self.search_hits(page_size=page_size) total_records = int(search_rs.TotalNumResults) get_page_hits = lambda(page): self.search_hits(page_size=page_size, page_number=page) page_nums = self._get_pages(page_size, total_records) hit_sets = itertools.imap(get_page_hits, page_nums) return itertools.chain.from_iterable(hit_sets) def search_hits(self, sort_by='CreationTime', sort_direction='Ascending', page_size=10, page_number=1, response_groups=None): """ Return a page of a Requester's HITs, on behalf of the Requester. The operation returns HITs of any status, except for HITs that have been disposed with the DisposeHIT operation. Note: The SearchHITs operation does not accept any search parameters that filter the results. """ params = {'SortProperty' : sort_by, 'SortDirection' : sort_direction, 'PageSize' : page_size, 'PageNumber' : page_number} # Handle optional response groups argument if response_groups: self.build_list_params(params, response_groups, 'ResponseGroup') return self._process_request('SearchHITs', params, [('HIT', HIT),]) def get_assignments(self, hit_id, status=None, sort_by='SubmitTime', sort_direction='Ascending', page_size=10, page_number=1, response_groups=None): """ Retrieves completed assignments for a HIT. Use this operation to retrieve the results for a HIT. The returned ResultSet will have the following attributes: NumResults The number of assignments on the page in the filtered results list, equivalent to the number of assignments being returned by this call. A non-negative integer PageNumber The number of the page in the filtered results list being returned. A positive integer TotalNumResults The total number of HITs in the filtered results list based on this call. A non-negative integer The ResultSet will contain zero or more Assignment objects """ params = {'HITId' : hit_id, 'SortProperty' : sort_by, 'SortDirection' : sort_direction, 'PageSize' : page_size, 'PageNumber' : page_number} if status is not None: params['AssignmentStatus'] = status # Handle optional response groups argument if response_groups: self.build_list_params(params, response_groups, 'ResponseGroup') return self._process_request('GetAssignmentsForHIT', params, [('Assignment', Assignment),]) def approve_assignment(self, assignment_id, feedback=None): """ """ params = {'AssignmentId' : assignment_id,} if feedback: params['RequesterFeedback'] = feedback return self._process_request('ApproveAssignment', params) def reject_assignment(self, assignment_id, feedback=None): """ """ params = {'AssignmentId' : assignment_id,} if feedback: params['RequesterFeedback'] = feedback return self._process_request('RejectAssignment', params) def get_hit(self, hit_id, response_groups=None): """ """ params = {'HITId' : hit_id,} # Handle optional response groups argument if response_groups: self.build_list_params(params, response_groups, 'ResponseGroup') return self._process_request('GetHIT', params, [('HIT', HIT),]) def set_reviewing(self, hit_id, revert=None): """ Update a HIT with a status of Reviewable to have a status of Reviewing, or reverts a Reviewing HIT back to the Reviewable status. Only HITs with a status of Reviewable can be updated with a status of Reviewing. Similarly, only Reviewing HITs can be reverted back to a status of Reviewable. """ params = {'HITId' : hit_id,} if revert: params['Revert'] = revert return self._process_request('SetHITAsReviewing', params) def disable_hit(self, hit_id, response_groups=None): """ Remove a HIT from the Mechanical Turk marketplace, approves all submitted assignments that have not already been approved or rejected, and disposes of the HIT and all assignment data. Assignments for the HIT that have already been submitted, but not yet approved or rejected, will be automatically approved. Assignments in progress at the time of the call to DisableHIT will be approved once the assignments are submitted. You will be charged for approval of these assignments. DisableHIT completely disposes of the HIT and all submitted assignment data. Assignment results data cannot be retrieved for a HIT that has been disposed. It is not possible to re-enable a HIT once it has been disabled. To make the work from a disabled HIT available again, create a new HIT. """ params = {'HITId' : hit_id,} # Handle optional response groups argument if response_groups: self.build_list_params(params, response_groups, 'ResponseGroup') return self._process_request('DisableHIT', params) def dispose_hit(self, hit_id): """ Dispose of a HIT that is no longer needed. Only HITs in the "reviewable" state, with all submitted assignments approved or rejected, can be disposed. A Requester can call GetReviewableHITs to determine which HITs are reviewable, then call GetAssignmentsForHIT to retrieve the assignments. Disposing of a HIT removes the HIT from the results of a call to GetReviewableHITs. """ params = {'HITId' : hit_id,} return self._process_request('DisposeHIT', params) def expire_hit(self, hit_id): """ Expire a HIT that is no longer needed. The effect is identical to the HIT expiring on its own. The HIT no longer appears on the Mechanical Turk web site, and no new Workers are allowed to accept the HIT. Workers who have accepted the HIT prior to expiration are allowed to complete it or return it, or allow the assignment duration to elapse (abandon the HIT). Once all remaining assignments have been submitted, the expired HIT becomes"reviewable", and will be returned by a call to GetReviewableHITs. """ params = {'HITId' : hit_id,} return self._process_request('ForceExpireHIT', params) def extend_hit(self, hit_id, assignments_increment=None, expiration_increment=None): """ Increase the maximum number of assignments, or extend the expiration date, of an existing HIT. NOTE: If a HIT has a status of Reviewable and the HIT is extended to make it Available, the HIT will not be returned by GetReviewableHITs, and its submitted assignments will not be returned by GetAssignmentsForHIT, until the HIT is Reviewable again. Assignment auto-approval will still happen on its original schedule, even if the HIT has been extended. Be sure to retrieve and approve (or reject) submitted assignments before extending the HIT, if so desired. """ # must provide assignment *or* expiration increment if (assignments_increment is None and expiration_increment is None) or \ (assignments_increment is not None and expiration_increment is not None): raise ValueError("Must specify either assignments_increment or expiration_increment, but not both") params = {'HITId' : hit_id,} if assignments_increment: params['MaxAssignmentsIncrement'] = assignments_increment if expiration_increment: params['ExpirationIncrementInSeconds'] = expiration_increment return self._process_request('ExtendHIT', params) def get_help(self, about, help_type='Operation'): """ Return information about the Mechanical Turk Service operations and response group NOTE - this is basically useless as it just returns the URL of the documentation help_type: either 'Operation' or 'ResponseGroup' """ params = {'About': about, 'HelpType': help_type,} return self._process_request('Help', params) def grant_bonus(self, worker_id, assignment_id, bonus_price, reason): """ Issues a payment of money from your account to a Worker. To be eligible for a bonus, the Worker must have submitted results for one of your HITs, and have had those results approved or rejected. This payment happens separately from the reward you pay to the Worker when you approve the Worker's assignment. The Bonus must be passed in as an instance of the Price object. """ params = bonus_price.get_as_params('BonusAmount', 1) params['WorkerId'] = worker_id params['AssignmentId'] = assignment_id params['Reason'] = reason return self._process_request('GrantBonus', params) def block_worker(self, worker_id, reason): """ Block a worker from working on my tasks. """ params = {'WorkerId': worker_id, 'Reason': reason} return self._process_request('BlockWorker', params) def unblock_worker(self, worker_id, reason): """ Unblock a worker from working on my tasks. """ params = {'WorkerId': worker_id, 'Reason': reason} return self._process_request('UnblockWorker', params) def notify_workers(self, worker_ids, subject, message_text): """ Send a text message to workers. """ params = {'Subject' : subject, 'MessageText': message_text} self.build_list_params(params, worker_ids, 'WorkerId') return self._process_request('NotifyWorkers', params) def create_qualification_type(self, name, description, status, keywords=None, retry_delay=None, test=None, answer_key=None, answer_key_xml=None, test_duration=None, auto_granted=False, auto_granted_value=1): """ Create a new Qualification Type. name: This will be visible to workers and must be unique for a given requester. description: description shown to workers. Max 2000 characters. status: 'Active' or 'Inactive' keywords: list of keyword strings or comma separated string. Max length of 1000 characters when concatenated with commas. retry_delay: number of seconds after requesting a qualification the worker must wait before they can ask again. If not specified, workers can only request this qualification once. test: a QuestionForm answer_key: an XML string of your answer key, for automatically scored qualification tests. (Consider implementing an AnswerKey class for this to support.) test_duration: the number of seconds a worker has to complete the test. auto_granted: if True, requests for the Qualification are granted immediately. Can't coexist with a test. auto_granted_value: auto_granted qualifications are given this value. """ params = {'Name' : name, 'Description' : description, 'QualificationTypeStatus' : status, } if retry_delay is not None: params['RetryDelay'] = retry_delay if test is not None: assert(isinstance(test, QuestionForm)) assert(test_duration is not None) params['Test'] = test.get_as_xml() if test_duration is not None: params['TestDurationInSeconds'] = test_duration if answer_key is not None: if isinstance(answer_key, basestring): params['AnswerKey'] = answer_key # xml else: raise TypeError # Eventually someone will write an AnswerKey class. if auto_granted: assert(test is False) params['AutoGranted'] = True params['AutoGrantedValue'] = auto_granted_value if keywords: params['Keywords'] = self.get_keywords_as_string(keywords) return self._process_request('CreateQualificationType', params, [('QualificationType', QualificationType),]) def get_qualification_type(self, qualification_type_id): params = {'QualificationTypeId' : qualification_type_id } return self._process_request('GetQualificationType', params, [('QualificationType', QualificationType),]) def get_qualifications_for_qualification_type(self, qualification_type_id): params = {'QualificationTypeId' : qualification_type_id } return self._process_request('GetQualificationsForQualificationType', params, [('QualificationType', QualificationType),]) def update_qualification_type(self, qualification_type_id, description=None, status=None, retry_delay=None, test=None, answer_key=None, test_duration=None, auto_granted=None, auto_granted_value=None): params = {'QualificationTypeId' : qualification_type_id } if description is not None: params['Description'] = description if status is not None: params['QualificationTypeStatus'] = status if retry_delay is not None: params['RetryDelay'] = retry_delay if test is not None: assert(isinstance(test, QuestionForm)) params['Test'] = test.get_as_xml() if test_duration is not None: params['TestDuration'] = test_duration if answer_key is not None: if isinstance(answer_key, basestring): params['AnswerKey'] = answer_key # xml else: raise TypeError # Eventually someone will write an AnswerKey class. if auto_granted is not None: params['AutoGranted'] = auto_granted if auto_granted_value is not None: params['AutoGrantedValue'] = auto_granted_value return self._process_request('UpdateQualificationType', params, [('QualificationType', QualificationType),]) def dispose_qualification_type(self, qualification_type_id): """TODO: Document.""" params = {'QualificationTypeId' : qualification_type_id} return self._process_request('DisposeQualificationType', params) def search_qualification_types(self, query=None, sort_by='Name', sort_direction='Ascending', page_size=10, page_number=1, must_be_requestable=True, must_be_owned_by_caller=True): """TODO: Document.""" params = {'Query' : query, 'SortProperty' : sort_by, 'SortDirection' : sort_direction, 'PageSize' : page_size, 'PageNumber' : page_number, 'MustBeRequestable' : must_be_requestable, 'MustBeOwnedByCaller' : must_be_owned_by_caller} return self._process_request('SearchQualificationTypes', params, [('QualificationType', QualificationType),]) def get_qualification_requests(self, qualification_type_id, sort_by='Expiration', sort_direction='Ascending', page_size=10, page_number=1): """TODO: Document.""" params = {'QualificationTypeId' : qualification_type_id, 'SortProperty' : sort_by, 'SortDirection' : sort_direction, 'PageSize' : page_size, 'PageNumber' : page_number} return self._process_request('GetQualificationRequests', params, [('QualificationRequest', QualificationRequest),]) def grant_qualification(self, qualification_request_id, integer_value=1): """TODO: Document.""" params = {'QualificationRequestId' : qualification_request_id, 'IntegerValue' : integer_value} return self._process_request('GrantQualification', params) def revoke_qualification(self, subject_id, qualification_type_id, reason=None): """TODO: Document.""" params = {'SubjectId' : subject_id, 'QualificationTypeId' : qualification_type_id, 'Reason' : reason} return self._process_request('RevokeQualification', params) def assign_qualification(self, qualification_type_id, worker_id, value=1, send_notification=True): params = {'QualificationTypeId' : qualification_type_id, 'WorkerId' : worker_id, 'IntegerValue' : value, 'SendNotification' : send_notification} return self._process_request('AssignQualification', params) def get_qualification_score(self, qualification_type_id, worker_id): """TODO: Document.""" params = {'QualificationTypeId' : qualification_type_id, 'SubjectId' : worker_id} return self._process_request('GetQualificationScore', params, [('Qualification', Qualification),]) def update_qualification_score(self, qualification_type_id, worker_id, value): """TODO: Document.""" params = {'QualificationTypeId' : qualification_type_id, 'SubjectId' : worker_id, 'IntegerValue' : value} return self._process_request('UpdateQualificationScore', params) def _process_request(self, request_type, params, marker_elems=None): """ Helper to process the xml response from AWS """ response = self.make_request(request_type, params, verb='POST') return self._process_response(response, marker_elems) def _process_response(self, response, marker_elems=None): """ Helper to process the xml response from AWS """ body = response.read() #print body if '' not in body: rs = ResultSet(marker_elems) h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs else: raise MTurkRequestError(response.status, response.reason, body) @staticmethod def get_keywords_as_string(keywords): """ Returns a comma+space-separated string of keywords from either a list or a string """ if type(keywords) is list: keywords = ', '.join(keywords) if type(keywords) is str: final_keywords = keywords elif type(keywords) is unicode: final_keywords = keywords.encode('utf-8') elif keywords is None: final_keywords = "" else: raise TypeError("keywords argument must be a string or a list of strings; got a %s" % type(keywords)) return final_keywords @staticmethod def get_price_as_price(reward): """ Returns a Price data structure from either a float or a Price """ if isinstance(reward, Price): final_price = reward else: final_price = Price(reward) return final_price @staticmethod def duration_as_seconds(duration): if isinstance(duration, datetime.timedelta): duration = duration.days*86400 + duration.seconds try: duration = int(duration) except TypeError: raise TypeError("Duration must be a timedelta or int-castable, got %s" % type(duration)) return duration class BaseAutoResultElement: """ Base class to automatically add attributes when parsing XML """ def __init__(self, connection): pass def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): setattr(self, name, value) class HIT(BaseAutoResultElement): """ Class to extract a HIT structure from a response (used in ResultSet) Will have attributes named as per the Developer Guide, e.g. HITId, HITTypeId, CreationTime """ # property helper to determine if HIT has expired def _has_expired(self): """ Has this HIT expired yet? """ expired = False if hasattr(self, 'Expiration'): now = datetime.datetime.utcnow() expiration = datetime.datetime.strptime(self.Expiration, '%Y-%m-%dT%H:%M:%SZ') expired = (now >= expiration) else: raise ValueError("ERROR: Request for expired property, but no Expiration in HIT!") return expired # are we there yet? expired = property(_has_expired) class Qualification(BaseAutoResultElement): """ Class to extract an Qualification structure from a response (used in ResultSet) Will have attributes named as per the Developer Guide such as QualificationTypeId, IntegerValue. Does not seem to contain GrantTime. """ pass class QualificationType(BaseAutoResultElement): """ Class to extract an QualificationType structure from a response (used in ResultSet) Will have attributes named as per the Developer Guide, e.g. QualificationTypeId, CreationTime, Name, etc """ pass class QualificationRequest(BaseAutoResultElement): """ Class to extract an QualificationRequest structure from a response (used in ResultSet) Will have attributes named as per the Developer Guide, e.g. QualificationRequestId, QualificationTypeId, SubjectId, etc TODO: Ensure that Test and Answer attribute are treated properly if the qualification requires a test. These attributes are XML-encoded. """ pass class Assignment(BaseAutoResultElement): """ Class to extract an Assignment structure from a response (used in ResultSet) Will have attributes named as per the Developer Guide, e.g. AssignmentId, WorkerId, HITId, Answer, etc """ def __init__(self, connection): BaseAutoResultElement.__init__(self, connection) self.answers = [] def endElement(self, name, value, connection): # the answer consists of embedded XML, so it needs to be parsed independantly if name == 'Answer': answer_rs = ResultSet([('Answer', QuestionFormAnswer),]) h = handler.XmlHandler(answer_rs, connection) value = connection.get_utf8_value(value) xml.sax.parseString(value, h) self.answers.append(answer_rs) else: BaseAutoResultElement.endElement(self, name, value, connection) class QuestionFormAnswer(BaseAutoResultElement): """ Class to extract Answers from inside the embedded XML QuestionFormAnswers element inside the Answer element which is part of the Assignment structure A QuestionFormAnswers element contains an Answer element for each question in the HIT or Qualification test for which the Worker provided an answer. Each Answer contains a QuestionIdentifier element whose value corresponds to the QuestionIdentifier of a Question in the QuestionForm. See the QuestionForm data structure for more information about questions and answer specifications. If the question expects a free-text answer, the Answer element contains a FreeText element. This element contains the Worker's answer *NOTE* - currently really only supports free-text and selection answers """ def __init__(self, connection): BaseAutoResultElement.__init__(self, connection) self.fields = [] self.qid = None def endElement(self, name, value, connection): if name == 'QuestionIdentifier': self.qid = value elif name in ['FreeText', 'SelectionIdentifier', 'OtherSelectionText'] and self.qid: self.fields.append((self.qid,value)) elif name == 'Answer': self.qid = None ================================================ FILE: deploy/third_party/boto-2.1.1/boto/mturk/notification.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Provides NotificationMessage and Event classes, with utility methods, for implementations of the Mechanical Turk Notification API. """ import hmac try: from hashlib import sha1 as sha except ImportError: import sha import base64 import re class NotificationMessage: NOTIFICATION_WSDL = "http://mechanicalturk.amazonaws.com/AWSMechanicalTurk/2006-05-05/AWSMechanicalTurkRequesterNotification.wsdl" NOTIFICATION_VERSION = '2006-05-05' SERVICE_NAME = "AWSMechanicalTurkRequesterNotification" OPERATION_NAME = "Notify" EVENT_PATTERN = r"Event\.(?P\d+)\.(?P\w+)" EVENT_RE = re.compile(EVENT_PATTERN) def __init__(self, d): """ Constructor; expects parameter d to be a dict of string parameters from a REST transport notification message """ self.signature = d['Signature'] # vH6ZbE0NhkF/hfNyxz2OgmzXYKs= self.timestamp = d['Timestamp'] # 2006-05-23T23:22:30Z self.version = d['Version'] # 2006-05-05 assert d['method'] == NotificationMessage.OPERATION_NAME, "Method should be '%s'" % NotificationMessage.OPERATION_NAME # Build Events self.events = [] events_dict = {} if 'Event' in d: # TurboGears surprised me by 'doing the right thing' and making { 'Event': { '1': { 'EventType': ... } } } etc. events_dict = d['Event'] else: for k in d: v = d[k] if k.startswith('Event.'): ed = NotificationMessage.EVENT_RE.search(k).groupdict() n = int(ed['n']) param = str(ed['param']) if n not in events_dict: events_dict[n] = {} events_dict[n][param] = v for n in events_dict: self.events.append(Event(events_dict[n])) def verify(self, secret_key): """ Verifies the authenticity of a notification message. TODO: This is doing a form of authentication and this functionality should really be merged with the pluggable authentication mechanism at some point. """ verification_input = NotificationMessage.SERVICE_NAME verification_input += NotificationMessage.OPERATION_NAME verification_input += self.timestamp h = hmac.new(key=secret_key, digestmod=sha) h.update(verification_input) signature_calc = base64.b64encode(h.digest()) return self.signature == signature_calc class Event: def __init__(self, d): self.event_type = d['EventType'] self.event_time_str = d['EventTime'] self.hit_type = d['HITTypeId'] self.hit_id = d['HITId'] if 'AssignmentId' in d: # Not present in all event types self.assignment_id = d['AssignmentId'] #TODO: build self.event_time datetime from string self.event_time_str def __repr__(self): return "" % (self.event_type, self.hit_id) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/mturk/price.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class Price: def __init__(self, amount=0.0, currency_code='USD'): self.amount = amount self.currency_code = currency_code self.formatted_price = '' def __repr__(self): if self.formatted_price: return self.formatted_price else: return str(self.amount) def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'Amount': self.amount = float(value) elif name == 'CurrencyCode': self.currency_code = value elif name == 'FormattedPrice': self.formatted_price = value def get_as_params(self, label, ord=1): return {'%s.%d.Amount'%(label, ord) : str(self.amount), '%s.%d.CurrencyCode'%(label, ord) : self.currency_code} ================================================ FILE: deploy/third_party/boto-2.1.1/boto/mturk/qualification.py ================================================ # Copyright (c) 2008 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class Qualifications: def __init__(self, requirements=None): if requirements == None: requirements = [] self.requirements = requirements def add(self, req): self.requirements.append(req) def get_as_params(self): params = {} assert(len(self.requirements) <= 10) for n, req in enumerate(self.requirements): reqparams = req.get_as_params() for rp in reqparams: params['QualificationRequirement.%s.%s' % ((n+1),rp) ] = reqparams[rp] return params class Requirement(object): """ Representation of a single requirement """ def __init__(self, qualification_type_id, comparator, integer_value=None, required_to_preview=False): self.qualification_type_id = qualification_type_id self.comparator = comparator self.integer_value = integer_value self.required_to_preview = required_to_preview def get_as_params(self): params = { "QualificationTypeId": self.qualification_type_id, "Comparator": self.comparator, } if self.comparator != 'Exists' and self.integer_value is not None: params['IntegerValue'] = self.integer_value if self.required_to_preview: params['RequiredToPreview'] = "true" return params class PercentAssignmentsSubmittedRequirement(Requirement): """ The percentage of assignments the Worker has submitted, over all assignments the Worker has accepted. The value is an integer between 0 and 100. """ def __init__(self, comparator, integer_value, required_to_preview=False): Requirement.__init__(self, qualification_type_id="00000000000000000000", comparator=comparator, integer_value=integer_value, required_to_preview=required_to_preview) class PercentAssignmentsAbandonedRequirement(Requirement): """ 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. """ def __init__(self, comparator, integer_value, required_to_preview=False): Requirement.__init__(self, qualification_type_id="00000000000000000070", comparator=comparator, integer_value=integer_value, required_to_preview=required_to_preview) class PercentAssignmentsReturnedRequirement(Requirement): """ The percentage of assignments the Worker has returned, over all assignments the Worker has accepted. The value is an integer between 0 and 100. """ def __init__(self, comparator, integer_value, required_to_preview=False): Requirement.__init__(self, qualification_type_id="000000000000000000E0", comparator=comparator, integer_value=integer_value, required_to_preview=required_to_preview) class PercentAssignmentsApprovedRequirement(Requirement): """ 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. """ def __init__(self, comparator, integer_value, required_to_preview=False): Requirement.__init__(self, qualification_type_id="000000000000000000L0", comparator=comparator, integer_value=integer_value, required_to_preview=required_to_preview) class PercentAssignmentsRejectedRequirement(Requirement): """ 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. """ def __init__(self, comparator, integer_value, required_to_preview=False): Requirement.__init__(self, qualification_type_id="000000000000000000S0", comparator=comparator, integer_value=integer_value, required_to_preview=required_to_preview) class NumberHitsApprovedRequirement(Requirement): """ 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. """ def __init__(self, comparator, integer_value, required_to_preview=False): Requirement.__init__(self, qualification_type_id="00000000000000000040", comparator=comparator, integer_value=integer_value, required_to_preview=required_to_preview) class LocaleRequirement(Requirement): """ 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. """ def __init__(self, comparator, locale, required_to_preview=False): Requirement.__init__(self, qualification_type_id="00000000000000000071", comparator=comparator, integer_value=None, required_to_preview=required_to_preview) self.locale = locale def get_as_params(self): params = { "QualificationTypeId": self.qualification_type_id, "Comparator": self.comparator, 'LocaleValue.Country': self.locale, } if self.required_to_preview: params['RequiredToPreview'] = "true" return params class AdultRequirement(Requirement): """ 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). """ def __init__(self, comparator, integer_value, required_to_preview=False): Requirement.__init__(self, qualification_type_id="00000000000000000060", comparator=comparator, integer_value=integer_value, required_to_preview=required_to_preview) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/mturk/question.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class Question(object): template = "%(items)s" def __init__(self, identifier, content, answer_spec, is_required=False, display_name=None): # copy all of the parameters into object attributes self.__dict__.update(vars()) del self.self def get_as_params(self, label='Question'): return { label : self.get_as_xml() } def get_as_xml(self): items = [ SimpleField('QuestionIdentifier', self.identifier), SimpleField('IsRequired', str(self.is_required).lower()), self.content, self.answer_spec, ] if self.display_name is not None: items.insert(1, SimpleField('DisplayName', self.display_name)) items = ''.join(item.get_as_xml() for item in items) return self.template % vars() try: from lxml import etree class ValidatingXML(object): def validate(self): import urllib2 schema_src_file = urllib2.urlopen(self.schema_url) schema_doc = etree.parse(schema_src_file) schema = etree.XMLSchema(schema_doc) doc = etree.fromstring(self.get_as_xml()) schema.assertValid(doc) except ImportError: class ValidatingXML(object): def validate(self): pass class ExternalQuestion(ValidatingXML): """ An object for constructing an External Question. """ schema_url = "http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2006-07-14/ExternalQuestion.xsd" template = '%%(external_url)s%%(frame_height)s' % vars() def __init__(self, external_url, frame_height): self.external_url = external_url self.frame_height = frame_height def get_as_params(self, label='ExternalQuestion'): return { label : self.get_as_xml() } def get_as_xml(self): return self.template % vars(self) class XMLTemplate: def get_as_xml(self): return self.template % vars(self) class SimpleField(object, XMLTemplate): """ A Simple name/value pair that can be easily rendered as XML. >>> SimpleField('Text', 'A text string').get_as_xml() 'A text string' """ template = '<%(field)s>%(value)s' def __init__(self, field, value): self.field = field self.value = value class Binary(object, XMLTemplate): template = """%(type)s%(subtype)s%(url)s%(alt_text)s""" def __init__(self, type, subtype, url, alt_text): self.__dict__.update(vars()) del self.self class List(list): """A bulleted list suitable for OrderedContent or Overview content""" def get_as_xml(self): items = ''.join('%s' % item for item in self) return '%s' % items class Application(object): template = "<%(class_)s>%(content)s" parameter_template = "%(name)s%(value)s" def __init__(self, width, height, **parameters): self.width = width self.height = height self.parameters = parameters def get_inner_content(self, content): content.append_field('Width', self.width) content.append_field('Height', self.height) for name, value in self.parameters.items(): value = self.parameter_template % vars() content.append_field('ApplicationParameter', value) def get_as_xml(self): content = OrderedContent() self.get_inner_content(content) content = content.get_as_xml() class_ = self.__class__.__name__ return self.template % vars() class JavaApplet(Application): def __init__(self, path, filename, *args, **kwargs): self.path = path self.filename = filename super(JavaApplet, self).__init__(*args, **kwargs) def get_inner_content(self, content): content = OrderedContent() content.append_field('AppletPath', self.path) content.append_field('AppletFilename', self.filename) super(JavaApplet, self).get_inner_content(content) class Flash(Application): def __init__(self, url, *args, **kwargs): self.url = url super(Flash, self).__init__(*args, **kwargs) def get_inner_content(self, content): content = OrderedContent() content.append_field('FlashMovieURL', self.url) super(Flash, self).get_inner_content(content) class FormattedContent(object, XMLTemplate): schema_url = 'http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2006-07-14/FormattedContentXHTMLSubset.xsd' template = '' def __init__(self, content): self.content = content class OrderedContent(list): def append_field(self, field, value): self.append(SimpleField(field, value)) def get_as_xml(self): return ''.join(item.get_as_xml() for item in self) class Overview(OrderedContent): template = '%(content)s' def get_as_params(self, label='Overview'): return { label : self.get_as_xml() } def get_as_xml(self): content = super(Overview, self).get_as_xml() return self.template % vars() class QuestionForm(ValidatingXML, list): """ From the AMT API docs: The top-most element of the QuestionForm data structure is a QuestionForm element. This element contains optional Overview elements and one or more Question elements. There can be any number of these two element types listed in any order. The following example structure has an Overview element and a Question element followed by a second Overview element and Question element--all within the same QuestionForm. :: [...] [...] [...] [...] [...] QuestionForm is implemented as a list, so to construct a QuestionForm, simply append Questions and Overviews (with at least one Question). """ schema_url = "http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/QuestionForm.xsd" xml_template = """%%(items)s""" % vars() def is_valid(self): return ( any(isinstance(item, Question) for item in self) and all(isinstance(item, (Question, Overview)) for item in self) ) def get_as_xml(self): assert self.is_valid(), "QuestionForm contains invalid elements" items = ''.join(item.get_as_xml() for item in self) return self.xml_template % vars() class QuestionContent(OrderedContent): template = '%(content)s' def get_as_xml(self): content = super(QuestionContent, self).get_as_xml() return self.template % vars() class AnswerSpecification(object): template = '%(spec)s' def __init__(self, spec): self.spec = spec def get_as_xml(self): spec = self.spec.get_as_xml() return self.template % vars() class Constraints(OrderedContent): template = '%(content)s' def get_as_xml(self): content = super(Constraints, self).get_as_xml() return self.template % vars() class Constraint(object): def get_attributes(self): pairs = zip(self.attribute_names, self.attribute_values) attrs = ' '.join( '%s="%d"' % (name,value) for (name,value) in pairs if value is not None ) return attrs def get_as_xml(self): attrs = self.get_attributes() return self.template % vars() class NumericConstraint(Constraint): attribute_names = 'minValue', 'maxValue' template = '' def __init__(self, min_value=None, max_value=None): self.attribute_values = min_value, max_value class LengthConstraint(Constraint): attribute_names = 'minLength', 'maxLength' template = '' def __init__(self, min_length=None, max_length=None): self.attribute_values = min_length, max_length class RegExConstraint(Constraint): attribute_names = 'regex', 'errorText', 'flags' template = '' def __init__(self, pattern, error_text=None, flags=None): self.attribute_values = pattern, error_text, flags class NumberOfLinesSuggestion(object): template = '%(num_lines)s' def __init__(self, num_lines=1): self.num_lines = num_lines def get_as_xml(self): num_lines = self.num_lines return self.template % vars() class FreeTextAnswer(object): template = '%(items)s' def __init__(self, default=None, constraints=None, num_lines=None): self.default = default if constraints is None: self.constraints = Constraints() else: self.constraints = Constraints(constraints) self.num_lines = num_lines def get_as_xml(self): items = [self.constraints] if self.default: items.append(SimpleField('DefaultText', self.default)) if self.num_lines: items.append(NumberOfLinesSuggestion(self.num_lines)) items = ''.join(item.get_as_xml() for item in items) return self.template % vars() class FileUploadAnswer(object): template = """%(min_bytes)d%(max_bytes)d""" def __init__(self, min_bytes, max_bytes): assert 0 <= min_bytes <= max_bytes <= 2*10**9 self.min_bytes = min_bytes self.max_bytes = max_bytes def get_as_xml(self): return self.template % vars(self) class SelectionAnswer(object): """ A class to generate SelectionAnswer XML data structures. Does not yet implement Binary selection options. """ SELECTIONANSWER_XML_TEMPLATE = """%s%s%s""" # % (count_xml, style_xml, selections_xml) SELECTION_XML_TEMPLATE = """%s%s""" # (identifier, value_xml) SELECTION_VALUE_XML_TEMPLATE = """<%s>%s""" # (type, value, type) STYLE_XML_TEMPLATE = """%s""" # (style) MIN_SELECTION_COUNT_XML_TEMPLATE = """%s""" # count MAX_SELECTION_COUNT_XML_TEMPLATE = """%s""" # count ACCEPTED_STYLES = ['radiobutton', 'dropdown', 'checkbox', 'list', 'combobox', 'multichooser'] OTHER_SELECTION_ELEMENT_NAME = 'OtherSelection' def __init__(self, min=1, max=1, style=None, selections=None, type='text', other=False): if style is not None: if style in SelectionAnswer.ACCEPTED_STYLES: self.style_suggestion = style else: raise ValueError("style '%s' not recognized; should be one of %s" % (style, ', '.join(SelectionAnswer.ACCEPTED_STYLES))) else: self.style_suggestion = None if selections is None: raise ValueError("SelectionAnswer.__init__(): selections must be a non-empty list of (content, identifier) tuples") else: self.selections = selections self.min_selections = min self.max_selections = max assert len(selections) >= self.min_selections, "# of selections is less than minimum of %d" % self.min_selections #assert len(selections) <= self.max_selections, "# of selections exceeds maximum of %d" % self.max_selections self.type = type self.other = other def get_as_xml(self): if self.type == 'text': TYPE_TAG = "Text" elif self.type == 'binary': TYPE_TAG = "Binary" else: raise ValueError("illegal type: %s; must be either 'text' or 'binary'" % str(self.type)) # build list of elements selections_xml = "" for tpl in self.selections: value_xml = SelectionAnswer.SELECTION_VALUE_XML_TEMPLATE % (TYPE_TAG, tpl[0], TYPE_TAG) selection_xml = SelectionAnswer.SELECTION_XML_TEMPLATE % (tpl[1], value_xml) selections_xml += selection_xml if self.other: # add OtherSelection element as xml if available if hasattr(self.other, 'get_as_xml'): assert type(self.other) == FreeTextAnswer, 'OtherSelection can only be a FreeTextAnswer' selections_xml += self.other.get_as_xml().replace('FreeTextAnswer', 'OtherSelection') else: selections_xml += "" if self.style_suggestion is not None: style_xml = SelectionAnswer.STYLE_XML_TEMPLATE % self.style_suggestion else: style_xml = "" if self.style_suggestion != 'radiobutton': count_xml = SelectionAnswer.MIN_SELECTION_COUNT_XML_TEMPLATE %self.min_selections count_xml += SelectionAnswer.MAX_SELECTION_COUNT_XML_TEMPLATE %self.max_selections else: count_xml = "" ret = SelectionAnswer.SELECTIONANSWER_XML_TEMPLATE % (count_xml, style_xml, selections_xml) # return XML return ret ================================================ FILE: deploy/third_party/boto-2.1.1/boto/plugin.py ================================================ # Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Implements plugin related api. To define a new plugin just subclass Plugin, like this. class AuthPlugin(Plugin): pass Then start creating subclasses of your new plugin. class MyFancyAuth(AuthPlugin): capability = ['sign', 'vmac'] The actual interface is duck typed. """ import glob import imp, os.path class Plugin(object): """Base class for all plugins.""" capability = [] @classmethod def is_capable(cls, requested_capability): """Returns true if the requested capability is supported by this plugin """ for c in requested_capability: if not c in cls.capability: return False return True def get_plugin(cls, requested_capability=None): if not requested_capability: requested_capability = [] result = [] for handler in cls.__subclasses__(): if handler.is_capable(requested_capability): result.append(handler) return result def _import_module(filename): (path, name) = os.path.split(filename) (name, ext) = os.path.splitext(name) (file, filename, data) = imp.find_module(name, [path]) try: return imp.load_module(name, file, filename, data) finally: if file: file.close() _plugin_loaded = False def load_plugins(config): global _plugin_loaded if _plugin_loaded: return _plugin_loaded = True if not config.has_option('Plugin', 'plugin_directory'): return directory = config.get('Plugin', 'plugin_directory') for file in glob.glob(os.path.join(directory, '*.py')): _import_module(file) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/provider.py ================================================ # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright 2010 Google Inc. # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2011, Nexenta Systems Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ This class encapsulates the provider-specific header differences. """ import os import boto from boto import config from boto.gs.acl import ACL from boto.gs.acl import CannedACLStrings as CannedGSACLStrings from boto.s3.acl import CannedACLStrings as CannedS3ACLStrings from boto.s3.acl import Policy HEADER_PREFIX_KEY = 'header_prefix' METADATA_PREFIX_KEY = 'metadata_prefix' AWS_HEADER_PREFIX = 'x-amz-' GOOG_HEADER_PREFIX = 'x-goog-' ACL_HEADER_KEY = 'acl-header' AUTH_HEADER_KEY = 'auth-header' COPY_SOURCE_HEADER_KEY = 'copy-source-header' COPY_SOURCE_VERSION_ID_HEADER_KEY = 'copy-source-version-id-header' DELETE_MARKER_HEADER_KEY = 'delete-marker-header' DATE_HEADER_KEY = 'date-header' METADATA_DIRECTIVE_HEADER_KEY = 'metadata-directive-header' RESUMABLE_UPLOAD_HEADER_KEY = 'resumable-upload-header' SECURITY_TOKEN_HEADER_KEY = 'security-token-header' STORAGE_CLASS_HEADER_KEY = 'storage-class' MFA_HEADER_KEY = 'mfa-header' SERVER_SIDE_ENCRYPTION_KEY = 'server-side-encryption-header' VERSION_ID_HEADER_KEY = 'version-id-header' STORAGE_COPY_ERROR = 'StorageCopyError' STORAGE_CREATE_ERROR = 'StorageCreateError' STORAGE_DATA_ERROR = 'StorageDataError' STORAGE_PERMISSIONS_ERROR = 'StoragePermissionsError' STORAGE_RESPONSE_ERROR = 'StorageResponseError' class Provider(object): CredentialMap = { 'aws' : ('aws_access_key_id', 'aws_secret_access_key'), 'google' : ('gs_access_key_id', 'gs_secret_access_key'), } AclClassMap = { 'aws' : Policy, 'google' : ACL } CannedAclsMap = { 'aws' : CannedS3ACLStrings, 'google' : CannedGSACLStrings } HostKeyMap = { 'aws' : 's3', 'google' : 'gs' } ChunkedTransferSupport = { 'aws' : False, 'google' : True } # If you update this map please make sure to put "None" for the # right-hand-side for any headers that don't apply to a provider, rather # than simply leaving that header out (which would cause KeyErrors). HeaderInfoMap = { 'aws' : { HEADER_PREFIX_KEY : AWS_HEADER_PREFIX, METADATA_PREFIX_KEY : AWS_HEADER_PREFIX + 'meta-', ACL_HEADER_KEY : AWS_HEADER_PREFIX + 'acl', AUTH_HEADER_KEY : 'AWS', COPY_SOURCE_HEADER_KEY : AWS_HEADER_PREFIX + 'copy-source', COPY_SOURCE_VERSION_ID_HEADER_KEY : AWS_HEADER_PREFIX + 'copy-source-version-id', DATE_HEADER_KEY : AWS_HEADER_PREFIX + 'date', DELETE_MARKER_HEADER_KEY : AWS_HEADER_PREFIX + 'delete-marker', METADATA_DIRECTIVE_HEADER_KEY : AWS_HEADER_PREFIX + 'metadata-directive', RESUMABLE_UPLOAD_HEADER_KEY : None, SECURITY_TOKEN_HEADER_KEY : AWS_HEADER_PREFIX + 'security-token', SERVER_SIDE_ENCRYPTION_KEY : AWS_HEADER_PREFIX + 'server-side-encryption', VERSION_ID_HEADER_KEY : AWS_HEADER_PREFIX + 'version-id', STORAGE_CLASS_HEADER_KEY : AWS_HEADER_PREFIX + 'storage-class', MFA_HEADER_KEY : AWS_HEADER_PREFIX + 'mfa', }, 'google' : { HEADER_PREFIX_KEY : GOOG_HEADER_PREFIX, METADATA_PREFIX_KEY : GOOG_HEADER_PREFIX + 'meta-', ACL_HEADER_KEY : GOOG_HEADER_PREFIX + 'acl', AUTH_HEADER_KEY : 'GOOG1', COPY_SOURCE_HEADER_KEY : GOOG_HEADER_PREFIX + 'copy-source', COPY_SOURCE_VERSION_ID_HEADER_KEY : GOOG_HEADER_PREFIX + 'copy-source-version-id', DATE_HEADER_KEY : GOOG_HEADER_PREFIX + 'date', DELETE_MARKER_HEADER_KEY : GOOG_HEADER_PREFIX + 'delete-marker', METADATA_DIRECTIVE_HEADER_KEY : GOOG_HEADER_PREFIX + 'metadata-directive', RESUMABLE_UPLOAD_HEADER_KEY : GOOG_HEADER_PREFIX + 'resumable', SECURITY_TOKEN_HEADER_KEY : GOOG_HEADER_PREFIX + 'security-token', SERVER_SIDE_ENCRYPTION_KEY : None, # Note that this version header is not to be confused with # the Google Cloud Storage 'x-goog-api-version' header. VERSION_ID_HEADER_KEY : GOOG_HEADER_PREFIX + 'version-id', STORAGE_CLASS_HEADER_KEY : None, MFA_HEADER_KEY : None, } } ErrorMap = { 'aws' : { STORAGE_COPY_ERROR : boto.exception.S3CopyError, STORAGE_CREATE_ERROR : boto.exception.S3CreateError, STORAGE_DATA_ERROR : boto.exception.S3DataError, STORAGE_PERMISSIONS_ERROR : boto.exception.S3PermissionsError, STORAGE_RESPONSE_ERROR : boto.exception.S3ResponseError, }, 'google' : { STORAGE_COPY_ERROR : boto.exception.GSCopyError, STORAGE_CREATE_ERROR : boto.exception.GSCreateError, STORAGE_DATA_ERROR : boto.exception.GSDataError, STORAGE_PERMISSIONS_ERROR : boto.exception.GSPermissionsError, STORAGE_RESPONSE_ERROR : boto.exception.GSResponseError, } } def __init__(self, name, access_key=None, secret_key=None, security_token=None): self.host = None self.access_key = access_key self.secret_key = secret_key self.security_token = security_token self.name = name self.acl_class = self.AclClassMap[self.name] self.canned_acls = self.CannedAclsMap[self.name] self.get_credentials(access_key, secret_key) self.configure_headers() self.configure_errors() # allow config file to override default host host_opt_name = '%s_host' % self.HostKeyMap[self.name] if config.has_option('Credentials', host_opt_name): self.host = config.get('Credentials', host_opt_name) def get_credentials(self, access_key=None, secret_key=None): access_key_name, secret_key_name = self.CredentialMap[self.name] if access_key is not None: self.access_key = access_key elif os.environ.has_key(access_key_name.upper()): self.access_key = os.environ[access_key_name.upper()] elif config.has_option('Credentials', access_key_name): self.access_key = config.get('Credentials', access_key_name) if secret_key is not None: self.secret_key = secret_key elif os.environ.has_key(secret_key_name.upper()): self.secret_key = os.environ[secret_key_name.upper()] elif config.has_option('Credentials', secret_key_name): self.secret_key = config.get('Credentials', secret_key_name) if isinstance(self.secret_key, unicode): # the secret key must be bytes and not unicode to work # properly with hmac.new (see http://bugs.python.org/issue5285) self.secret_key = str(self.secret_key) def configure_headers(self): header_info_map = self.HeaderInfoMap[self.name] self.metadata_prefix = header_info_map[METADATA_PREFIX_KEY] self.header_prefix = header_info_map[HEADER_PREFIX_KEY] self.acl_header = header_info_map[ACL_HEADER_KEY] self.auth_header = header_info_map[AUTH_HEADER_KEY] self.copy_source_header = header_info_map[COPY_SOURCE_HEADER_KEY] self.copy_source_version_id = header_info_map[ COPY_SOURCE_VERSION_ID_HEADER_KEY] self.date_header = header_info_map[DATE_HEADER_KEY] self.delete_marker = header_info_map[DELETE_MARKER_HEADER_KEY] self.metadata_directive_header = ( header_info_map[METADATA_DIRECTIVE_HEADER_KEY]) self.security_token_header = header_info_map[SECURITY_TOKEN_HEADER_KEY] self.resumable_upload_header = ( header_info_map[RESUMABLE_UPLOAD_HEADER_KEY]) self.server_side_encryption_header = header_info_map[SERVER_SIDE_ENCRYPTION_KEY] self.storage_class_header = header_info_map[STORAGE_CLASS_HEADER_KEY] self.version_id = header_info_map[VERSION_ID_HEADER_KEY] self.mfa_header = header_info_map[MFA_HEADER_KEY] def configure_errors(self): error_map = self.ErrorMap[self.name] self.storage_copy_error = error_map[STORAGE_COPY_ERROR] self.storage_create_error = error_map[STORAGE_CREATE_ERROR] self.storage_data_error = error_map[STORAGE_DATA_ERROR] self.storage_permissions_error = error_map[STORAGE_PERMISSIONS_ERROR] self.storage_response_error = error_map[STORAGE_RESPONSE_ERROR] def get_provider_name(self): return self.HostKeyMap[self.name] def supports_chunked_transfer(self): return self.ChunkedTransferSupport[self.name] # Static utility method for getting default Provider. def get_default(): return Provider('aws') ================================================ FILE: deploy/third_party/boto-2.1.1/boto/pyami/__init__.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # ================================================ FILE: deploy/third_party/boto-2.1.1/boto/pyami/bootstrap.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # import os import boto from boto.utils import get_instance_metadata, get_instance_userdata from boto.pyami.config import Config, BotoConfigPath from boto.pyami.scriptbase import ScriptBase import time class Bootstrap(ScriptBase): """ The Bootstrap class is instantiated and run as part of the PyAMI instance initialization process. The methods in this class will be run from the rc.local script of the instance and will be run as the root user. The main purpose of this class is to make sure the boto distribution on the instance is the one required. """ def __init__(self): self.working_dir = '/mnt/pyami' self.write_metadata() ScriptBase.__init__(self) def write_metadata(self): fp = open(os.path.expanduser(BotoConfigPath), 'w') fp.write('[Instance]\n') inst_data = get_instance_metadata() for key in inst_data: fp.write('%s = %s\n' % (key, inst_data[key])) user_data = get_instance_userdata() fp.write('\n%s\n' % user_data) fp.write('[Pyami]\n') fp.write('working_dir = %s\n' % self.working_dir) fp.close() # This file has the AWS credentials, should we lock it down? # os.chmod(BotoConfigPath, stat.S_IREAD | stat.S_IWRITE) # now that we have written the file, read it into a pyami Config object boto.config = Config() boto.init_logging() def create_working_dir(self): boto.log.info('Working directory: %s' % self.working_dir) if not os.path.exists(self.working_dir): os.mkdir(self.working_dir) def load_boto(self): update = boto.config.get('Boto', 'boto_update', 'svn:HEAD') if update.startswith('svn'): if update.find(':') >= 0: method, version = update.split(':') version = '-r%s' % version else: version = '-rHEAD' location = boto.config.get('Boto', 'boto_location', '/usr/local/boto') self.run('svn update %s %s' % (version, location)) elif update.startswith('git'): location = boto.config.get('Boto', 'boto_location', '/usr/share/python-support/python-boto/boto') num_remaining_attempts = 10 while num_remaining_attempts > 0: num_remaining_attempts -= 1 try: self.run('git pull', cwd=location) num_remaining_attempts = 0 except Exception, e: boto.log.info('git pull attempt failed with the following exception. Trying again in a bit. %s', e) time.sleep(2) if update.find(':') >= 0: method, version = update.split(':') else: version = 'master' self.run('git checkout %s' % version, cwd=location) else: # first remove the symlink needed when running from subversion self.run('rm /usr/local/lib/python2.5/site-packages/boto') self.run('easy_install %s' % update) def fetch_s3_file(self, s3_file): try: from boto.utils import fetch_file f = fetch_file(s3_file) path = os.path.join(self.working_dir, s3_file.split("/")[-1]) open(path, "w").write(f.read()) except: boto.log.exception('Problem Retrieving file: %s' % s3_file) path = None return path def load_packages(self): package_str = boto.config.get('Pyami', 'packages') if package_str: packages = package_str.split(',') for package in packages: package = package.strip() if package.startswith('s3:'): package = self.fetch_s3_file(package) if package: # if the "package" is really a .py file, it doesn't have to # be installed, just being in the working dir is enough if not package.endswith('.py'): self.run('easy_install -Z %s' % package, exit_on_error=False) def main(self): self.create_working_dir() self.load_boto() self.load_packages() self.notify('Bootstrap Completed for %s' % boto.config.get_instance('instance-id')) if __name__ == "__main__": # because bootstrap starts before any logging configuration can be loaded from # the boto config files, we will manually enable logging to /var/log/boto.log boto.set_file_logger('bootstrap', '/var/log/boto.log') bs = Bootstrap() bs.main() ================================================ FILE: deploy/third_party/boto-2.1.1/boto/pyami/config.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # import StringIO, os, re import warnings import ConfigParser import boto # If running in Google App Engine there is no "user" and # os.path.expanduser() will fail. Attempt to detect this case and use a # no-op expanduser function in this case. try: os.path.expanduser('~') expanduser = os.path.expanduser except (AttributeError, ImportError): # This is probably running on App Engine. expanduser = (lambda x: x) # By default we use two locations for the boto configurations, # /etc/boto.cfg and ~/.boto (which works on Windows and Unix). BotoConfigPath = '/etc/boto.cfg' BotoConfigLocations = [BotoConfigPath] UserConfigPath = os.path.join(expanduser('~'), '.boto') BotoConfigLocations.append(UserConfigPath) # If there's a BOTO_CONFIG variable set, we load ONLY # that variable if 'BOTO_CONFIG' in os.environ: BotoConfigLocations = [expanduser(os.environ['BOTO_CONFIG'])] # If there's a BOTO_PATH variable set, we use anything there # as the current configuration locations, split with colons elif 'BOTO_PATH' in os.environ: BotoConfigLocations = [] for path in os.environ['BOTO_PATH'].split(":"): BotoConfigLocations.append(expanduser(path)) class Config(ConfigParser.SafeConfigParser): def __init__(self, path=None, fp=None, do_load=True): ConfigParser.SafeConfigParser.__init__(self, {'working_dir' : '/mnt/pyami', 'debug' : '0'}) if do_load: if path: self.load_from_path(path) elif fp: self.readfp(fp) else: self.read(BotoConfigLocations) if "AWS_CREDENTIAL_FILE" in os.environ: full_path = expanduser(os.environ['AWS_CREDENTIAL_FILE']) try: self.load_credential_file(full_path) except IOError: warnings.warn('Unable to load AWS_CREDENTIAL_FILE (%s)' % full_path) def load_credential_file(self, path): """Load a credential file as is setup like the Java utilities""" c_data = StringIO.StringIO() c_data.write("[Credentials]\n") for line in open(path, "r").readlines(): c_data.write(line.replace("AWSAccessKeyId", "aws_access_key_id").replace("AWSSecretKey", "aws_secret_access_key")) c_data.seek(0) self.readfp(c_data) def load_from_path(self, path): file = open(path) for line in file.readlines(): match = re.match("^#import[\s\t]*([^\s^\t]*)[\s\t]*$", line) if match: extended_file = match.group(1) (dir, file) = os.path.split(path) self.load_from_path(os.path.join(dir, extended_file)) self.read(path) def save_option(self, path, section, option, value): """ Write the specified Section.Option to the config file specified by path. Replace any previous value. If the path doesn't exist, create it. Also add the option the the in-memory config. """ config = ConfigParser.SafeConfigParser() config.read(path) if not config.has_section(section): config.add_section(section) config.set(section, option, value) fp = open(path, 'w') config.write(fp) fp.close() if not self.has_section(section): self.add_section(section) self.set(section, option, value) def save_user_option(self, section, option, value): self.save_option(UserConfigPath, section, option, value) def save_system_option(self, section, option, value): self.save_option(BotoConfigPath, section, option, value) def get_instance(self, name, default=None): try: val = self.get('Instance', name) except: val = default return val def get_user(self, name, default=None): try: val = self.get('User', name) except: val = default return val def getint_user(self, name, default=0): try: val = self.getint('User', name) except: val = default return val def get_value(self, section, name, default=None): return self.get(section, name, default) def get(self, section, name, default=None): try: val = ConfigParser.SafeConfigParser.get(self, section, name) except: val = default return val def getint(self, section, name, default=0): try: val = ConfigParser.SafeConfigParser.getint(self, section, name) except: val = int(default) return val def getfloat(self, section, name, default=0.0): try: val = ConfigParser.SafeConfigParser.getfloat(self, section, name) except: val = float(default) return val def getbool(self, section, name, default=False): if self.has_option(section, name): val = self.get(section, name) if val.lower() == 'true': val = True else: val = False else: val = default return val def setbool(self, section, name, value): if value: self.set(section, name, 'true') else: self.set(section, name, 'false') def dump(self): s = StringIO.StringIO() self.write(s) print s.getvalue() def dump_safe(self, fp=None): if not fp: fp = StringIO.StringIO() for section in self.sections(): fp.write('[%s]\n' % section) for option in self.options(section): if option == 'aws_secret_access_key': fp.write('%s = xxxxxxxxxxxxxxxxxx\n' % option) else: fp.write('%s = %s\n' % (option, self.get(section, option))) def dump_to_sdb(self, domain_name, item_name): try: import simplejson as json except ImportError: import json sdb = boto.connect_sdb() domain = sdb.lookup(domain_name) if not domain: domain = sdb.create_domain(domain_name) item = domain.new_item(item_name) item.active = False for section in self.sections(): d = {} for option in self.options(section): d[option] = self.get(section, option) item[section] = json.dumps(d) item.save() def load_from_sdb(self, domain_name, item_name): try: import json except ImportError: import simplejson as json sdb = boto.connect_sdb() domain = sdb.lookup(domain_name) item = domain.get_item(item_name) for section in item.keys(): if not self.has_section(section): self.add_section(section) d = json.loads(item[section]) for attr_name in d.keys(): attr_value = d[attr_name] if attr_value == None: attr_value = 'None' if isinstance(attr_value, bool): self.setbool(section, attr_name, attr_value) else: self.set(section, attr_name, attr_value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/pyami/copybot.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # import boto from boto.pyami.scriptbase import ScriptBase import os, StringIO class CopyBot(ScriptBase): def __init__(self): ScriptBase.__init__(self) self.wdir = boto.config.get('Pyami', 'working_dir') self.log_file = '%s.log' % self.instance_id self.log_path = os.path.join(self.wdir, self.log_file) boto.set_file_logger(self.name, self.log_path) self.src_name = boto.config.get(self.name, 'src_bucket') self.dst_name = boto.config.get(self.name, 'dst_bucket') self.replace = boto.config.getbool(self.name, 'replace_dst', True) s3 = boto.connect_s3() self.src = s3.lookup(self.src_name) if not self.src: boto.log.error('Source bucket does not exist: %s' % self.src_name) dest_access_key = boto.config.get(self.name, 'dest_aws_access_key_id', None) if dest_access_key: dest_secret_key = boto.config.get(self.name, 'dest_aws_secret_access_key', None) s3 = boto.connect(dest_access_key, dest_secret_key) self.dst = s3.lookup(self.dst_name) if not self.dst: self.dst = s3.create_bucket(self.dst_name) def copy_bucket_acl(self): if boto.config.get(self.name, 'copy_acls', True): acl = self.src.get_xml_acl() self.dst.set_xml_acl(acl) def copy_key_acl(self, src, dst): if boto.config.get(self.name, 'copy_acls', True): acl = src.get_xml_acl() dst.set_xml_acl(acl) def copy_keys(self): boto.log.info('src=%s' % self.src.name) boto.log.info('dst=%s' % self.dst.name) try: for key in self.src: if not self.replace: exists = self.dst.lookup(key.name) if exists: boto.log.info('key=%s already exists in %s, skipping' % (key.name, self.dst.name)) continue boto.log.info('copying %d bytes from key=%s' % (key.size, key.name)) prefix, base = os.path.split(key.name) path = os.path.join(self.wdir, base) key.get_contents_to_filename(path) new_key = self.dst.new_key(key.name) new_key.set_contents_from_filename(path) self.copy_key_acl(key, new_key) os.unlink(path) except: boto.log.exception('Error copying key: %s' % key.name) def copy_log(self): key = self.dst.new_key(self.log_file) key.set_contents_from_filename(self.log_path) def main(self): fp = StringIO.StringIO() boto.config.dump_safe(fp) self.notify('%s (%s) Starting' % (self.name, self.instance_id), fp.getvalue()) if self.src and self.dst: self.copy_keys() if self.dst: self.copy_log() self.notify('%s (%s) Stopping' % (self.name, self.instance_id), 'Copy Operation Complete') if boto.config.getbool(self.name, 'exit_on_completion', True): ec2 = boto.connect_ec2() ec2.terminate_instances([self.instance_id]) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/pyami/helloworld.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # from boto.pyami.scriptbase import ScriptBase class HelloWorld(ScriptBase): def main(self): self.log('Hello World!!!') ================================================ FILE: deploy/third_party/boto-2.1.1/boto/pyami/launch_ami.py ================================================ #!/usr/bin/env python # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # import getopt import sys import imp import time import boto usage_string = """ SYNOPSIS launch_ami.py -a ami_id [-b script_bucket] [-s script_name] [-m module] [-c class_name] [-r] [-g group] [-k key_name] [-n num_instances] [-w] [extra_data] Where: ami_id - the id of the AMI you wish to launch module - The name of the Python module containing the class you want to run when the instance is started. If you use this option the Python module must already be stored on the instance in a location that is on the Python path. script_file - The name of a local Python module that you would like to have copied to S3 and then run on the instance when it is started. The specified module must be import'able (i.e. in your local Python path). It will then be copied to the specified bucket in S3 (see the -b option). Once the new instance(s) start up the script will be copied from S3 and then run locally on the instance. class_name - The name of the class to be instantiated within the module or script file specified. script_bucket - the name of the bucket in which the script will be stored group - the name of the security group the instance will run in key_name - the name of the keypair to use when launching the AMI num_instances - how many instances of the AMI to launch (default 1) input_queue_name - Name of SQS to read input messages from output_queue_name - Name of SQS to write output messages to extra_data - additional name-value pairs that will be passed as userdata to the newly launched instance. These should be of the form "name=value" The -r option reloads the Python module to S3 without launching another instance. This can be useful during debugging to allow you to test a new version of your script without shutting down your instance and starting up another one. The -w option tells the script to run synchronously, meaning to wait until the instance is actually up and running. It then prints the IP address and internal and external DNS names before exiting. """ def usage(): print usage_string sys.exit() def main(): try: opts, args = getopt.getopt(sys.argv[1:], 'a:b:c:g:hi:k:m:n:o:rs:w', ['ami', 'bucket', 'class', 'group', 'help', 'inputqueue', 'keypair', 'module', 'numinstances', 'outputqueue', 'reload', 'script_name', 'wait']) except: usage() params = {'module_name' : None, 'script_name' : None, 'class_name' : None, 'script_bucket' : None, 'group' : 'default', 'keypair' : None, 'ami' : None, 'num_instances' : 1, 'input_queue_name' : None, 'output_queue_name' : None} reload = None wait = None for o, a in opts: if o in ('-a', '--ami'): params['ami'] = a if o in ('-b', '--bucket'): params['script_bucket'] = a if o in ('-c', '--class'): params['class_name'] = a if o in ('-g', '--group'): params['group'] = a if o in ('-h', '--help'): usage() if o in ('-i', '--inputqueue'): params['input_queue_name'] = a if o in ('-k', '--keypair'): params['keypair'] = a if o in ('-m', '--module'): params['module_name'] = a if o in ('-n', '--num_instances'): params['num_instances'] = int(a) if o in ('-o', '--outputqueue'): params['output_queue_name'] = a if o in ('-r', '--reload'): reload = True if o in ('-s', '--script'): params['script_name'] = a if o in ('-w', '--wait'): wait = True # check required fields required = ['ami'] for pname in required: if not params.get(pname, None): print '%s is required' % pname usage() if params['script_name']: # first copy the desired module file to S3 bucket if reload: print 'Reloading module %s to S3' % params['script_name'] else: print 'Copying module %s to S3' % params['script_name'] l = imp.find_module(params['script_name']) c = boto.connect_s3() bucket = c.get_bucket(params['script_bucket']) key = bucket.new_key(params['script_name']+'.py') key.set_contents_from_file(l[0]) params['script_md5'] = key.md5 # we have everything we need, now build userdata string l = [] for k, v in params.items(): if v: l.append('%s=%s' % (k, v)) c = boto.connect_ec2() l.append('aws_access_key_id=%s' % c.aws_access_key_id) l.append('aws_secret_access_key=%s' % c.aws_secret_access_key) for kv in args: l.append(kv) s = '|'.join(l) if not reload: rs = c.get_all_images([params['ami']]) img = rs[0] r = img.run(user_data=s, key_name=params['keypair'], security_groups=[params['group']], max_count=params.get('num_instances', 1)) print 'AMI: %s - %s (Started)' % (params['ami'], img.location) print 'Reservation %s contains the following instances:' % r.id for i in r.instances: print '\t%s' % i.id if wait: running = False while not running: time.sleep(30) [i.update() for i in r.instances] status = [i.state for i in r.instances] print status if status.count('running') == len(r.instances): running = True for i in r.instances: print 'Instance: %s' % i.ami_launch_index print 'Public DNS Name: %s' % i.public_dns_name print 'Private DNS Name: %s' % i.private_dns_name if __name__ == "__main__": main() ================================================ FILE: deploy/third_party/boto-2.1.1/boto/pyami/scriptbase.py ================================================ import os import sys from boto.utils import ShellCommand, get_ts import boto import boto.utils class ScriptBase: def __init__(self, config_file=None): self.instance_id = boto.config.get('Instance', 'instance-id', 'default') self.name = self.__class__.__name__ self.ts = get_ts() if config_file: boto.config.read(config_file) def notify(self, subject, body=''): boto.utils.notify(subject, body) def mkdir(self, path): if not os.path.isdir(path): try: os.mkdir(path) except: boto.log.error('Error creating directory: %s' % path) def umount(self, path): if os.path.ismount(path): self.run('umount %s' % path) def run(self, command, notify=True, exit_on_error=False, cwd=None): self.last_command = ShellCommand(command, cwd=cwd) if self.last_command.status != 0: boto.log.error('Error running command: "%s". Output: "%s"' % (command, self.last_command.output)) if notify: self.notify('Error encountered', \ 'Error running the following command:\n\t%s\n\nCommand output:\n\t%s' % \ (command, self.last_command.output)) if exit_on_error: sys.exit(-1) return self.last_command.status def main(self): pass ================================================ FILE: deploy/third_party/boto-2.1.1/boto/pyami/startup.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # import sys import boto from boto.utils import find_class from boto import config from boto.pyami.scriptbase import ScriptBase class Startup(ScriptBase): def run_scripts(self): scripts = config.get('Pyami', 'scripts') if scripts: for script in scripts.split(','): script = script.strip(" ") try: pos = script.rfind('.') if pos > 0: mod_name = script[0:pos] cls_name = script[pos+1:] cls = find_class(mod_name, cls_name) boto.log.info('Running Script: %s' % script) s = cls() s.main() else: boto.log.warning('Trouble parsing script: %s' % script) except Exception, e: boto.log.exception('Problem Running Script: %s. Startup process halting.' % script) raise e def main(self): self.run_scripts() self.notify('Startup Completed for %s' % config.get('Instance', 'instance-id')) if __name__ == "__main__": if not config.has_section('loggers'): boto.set_file_logger('startup', '/var/log/boto.log') sys.path.append(config.get('Pyami', 'working_dir')) su = Startup() su.main() ================================================ FILE: deploy/third_party/boto-2.1.1/boto/rds/__init__.py ================================================ # Copyright (c) 2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # import boto.utils import urllib from boto.connection import AWSQueryConnection from boto.rds.dbinstance import DBInstance from boto.rds.dbsecuritygroup import DBSecurityGroup from boto.rds.parametergroup import ParameterGroup from boto.rds.dbsnapshot import DBSnapshot from boto.rds.event import Event from boto.rds.regioninfo import RDSRegionInfo def regions(): """ Get all available regions for the RDS service. :rtype: list :return: A list of :class:`boto.rds.regioninfo.RDSRegionInfo` """ return [RDSRegionInfo(name='us-east-1', endpoint='rds.us-east-1.amazonaws.com'), RDSRegionInfo(name='eu-west-1', endpoint='rds.eu-west-1.amazonaws.com'), RDSRegionInfo(name='us-west-1', endpoint='rds.us-west-1.amazonaws.com'), RDSRegionInfo(name='ap-northeast-1', endpoint='rds.ap-northeast-1.amazonaws.com'), RDSRegionInfo(name='ap-southeast-1', endpoint='rds.ap-southeast-1.amazonaws.com') ] def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.ec2.connection.EC2Connection`. Any additional parameters after the region_name are passed on to the connect method of the region object. :type: str :param region_name: The name of the region to connect to. :rtype: :class:`boto.ec2.connection.EC2Connection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ for region in regions(): if region.name == region_name: return region.connect(**kw_params) return None #boto.set_stream_logger('rds') class RDSConnection(AWSQueryConnection): DefaultRegionName = 'us-east-1' DefaultRegionEndpoint = 'rds.amazonaws.com' APIVersion = '2011-04-01' def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, region=None, path='/'): if not region: region = RDSRegionInfo(self, self.DefaultRegionName, self.DefaultRegionEndpoint) self.region = region AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, self.region.endpoint, debug, https_connection_factory, path) def _required_auth_capability(self): return ['rds'] # DB Instance methods def get_all_dbinstances(self, instance_id=None, max_records=None, marker=None): """ Retrieve all the DBInstances in your account. :type instance_id: str :param instance_id: DB Instance identifier. If supplied, only information this instance will be returned. Otherwise, info about all DB Instances will be returned. :type max_records: int :param max_records: The maximum number of records to be returned. If more results are available, a MoreToken will be returned in the response that can be used to retrieve additional records. Default is 100. :type marker: str :param marker: The marker provided by a previous request. :rtype: list :return: A list of :class:`boto.rds.dbinstance.DBInstance` """ params = {} if instance_id: params['DBInstanceIdentifier'] = instance_id if max_records: params['MaxRecords'] = max_records if marker: params['Marker'] = marker return self.get_list('DescribeDBInstances', params, [('DBInstance', DBInstance)]) def create_dbinstance(self, id, allocated_storage, instance_class, master_username, master_password, port=3306, engine='MySQL5.1', db_name=None, param_group=None, security_groups=None, availability_zone=None, preferred_maintenance_window=None, backup_retention_period=None, preferred_backup_window=None, multi_az=False, engine_version=None, auto_minor_version_upgrade=True): """ Create a new DBInstance. :type id: str :param id: Unique identifier for the new instance. Must contain 1-63 alphanumeric characters. First character must be a letter. May not end with a hyphen or contain two consecutive hyphens :type allocated_storage: int :param allocated_storage: Initially allocated storage size, in GBs. Valid values are [5-1024] :type instance_class: str :param instance_class: The compute and memory capacity of the DBInstance. Valid values are: * db.m1.small * db.m1.large * db.m1.xlarge * db.m2.xlarge * db.m2.2xlarge * db.m2.4xlarge :type engine: str :param engine: Name of database engine. Must be MySQL5.1 for now. :type master_username: str :param master_username: Name of master user for the DBInstance. Must be 1-15 alphanumeric characters, first must be a letter. :type master_password: str :param master_password: Password of master user for the DBInstance. Must be 4-16 alphanumeric characters. :type port: int :param port: Port number on which database accepts connections. Valid values [1115-65535]. Defaults to 3306. :type db_name: str :param db_name: Name of a database to create when the DBInstance is created. Default is to create no databases. :type param_group: str :param param_group: Name of DBParameterGroup to associate with this DBInstance. If no groups are specified no parameter groups will be used. :type security_groups: list of str or list of DBSecurityGroup objects :param security_groups: List of names of DBSecurityGroup to authorize on this DBInstance. :type availability_zone: str :param availability_zone: Name of the availability zone to place DBInstance into. :type preferred_maintenance_window: str :param preferred_maintenance_window: The weekly time range (in UTC) during which maintenance can occur. Default is Sun:05:00-Sun:09:00 :type backup_retention_period: int :param backup_retention_period: The number of days for which automated backups are retained. Setting this to zero disables automated backups. :type preferred_backup_window: str :param preferred_backup_window: The daily time range during which automated backups are created (if enabled). Must be in h24:mi-hh24:mi format (UTC). :type multi_az: bool :param multi_az: If True, specifies the DB Instance will be deployed in multiple availability zones. :type engine_version: str :param engine_version: Version number of the database engine to use. :type auto_minor_version_upgrade: bool :param auto_minor_version_upgrade: Indicates that minor engine upgrades will be applied automatically to the Read Replica during the maintenance window. Default is True. :rtype: :class:`boto.rds.dbinstance.DBInstance` :return: The new db instance. """ params = {'DBInstanceIdentifier' : id, 'AllocatedStorage' : allocated_storage, 'DBInstanceClass' : instance_class, 'Engine' : engine, 'MasterUsername' : master_username, 'MasterUserPassword' : master_password} if port: params['Port'] = port if db_name: params['DBName'] = db_name if param_group: params['DBParameterGroupName'] = param_group if security_groups: l = [] for group in security_groups: if isinstance(group, DBSecurityGroup): l.append(group.name) else: l.append(group) self.build_list_params(params, l, 'DBSecurityGroups.member') if availability_zone: params['AvailabilityZone'] = availability_zone if preferred_maintenance_window: params['PreferredMaintenanceWindow'] = preferred_maintenance_window if backup_retention_period is not None: params['BackupRetentionPeriod'] = backup_retention_period if preferred_backup_window: params['PreferredBackupWindow'] = preferred_backup_window if multi_az: params['MultiAZ'] = 'true' if engine_version: params['EngineVersion'] = engine_version if auto_minor_version_upgrade is False: params['AutoMinorVersionUpgrade'] = 'false' return self.get_object('CreateDBInstance', params, DBInstance) def create_dbinstance_read_replica(self, id, source_id, instance_class=None, port=3306, availability_zone=None, auto_minor_version_upgrade=None): """ Create a new DBInstance Read Replica. :type id: str :param id: Unique identifier for the new instance. Must contain 1-63 alphanumeric characters. First character must be a letter. May not end with a hyphen or contain two consecutive hyphens :type source_id: str :param source_id: Unique identifier for the DB Instance for which this DB Instance will act as a Read Replica. :type instance_class: str :param instance_class: The compute and memory capacity of the DBInstance. Default is to inherit from the source DB Instance. Valid values are: * db.m1.small * db.m1.large * db.m1.xlarge * db.m2.xlarge * db.m2.2xlarge * db.m2.4xlarge :type port: int :param port: Port number on which database accepts connections. Default is to inherit from source DB Instance. Valid values [1115-65535]. Defaults to 3306. :type availability_zone: str :param availability_zone: Name of the availability zone to place DBInstance into. :type auto_minor_version_upgrade: bool :param auto_minor_version_upgrade: Indicates that minor engine upgrades will be applied automatically to the Read Replica during the maintenance window. Default is to inherit this value from the source DB Instance. :rtype: :class:`boto.rds.dbinstance.DBInstance` :return: The new db instance. """ params = {'DBInstanceIdentifier' : id, 'SourceDBInstanceIdentifier' : source_id} if instance_class: params['DBInstanceClass'] = instance_class if port: params['Port'] = port if availability_zone: params['AvailabilityZone'] = availability_zone if auto_minor_version_upgrade is not None: if auto_minor_version_upgrade is True: params['AutoMinorVersionUpgrade'] = 'true' else: params['AutoMinorVersionUpgrade'] = 'false' return self.get_object('CreateDBInstanceReadReplica', params, DBInstance) def modify_dbinstance(self, id, param_group=None, security_groups=None, preferred_maintenance_window=None, master_password=None, allocated_storage=None, instance_class=None, backup_retention_period=None, preferred_backup_window=None, multi_az=False, apply_immediately=False): """ Modify an existing DBInstance. :type id: str :param id: Unique identifier for the new instance. :type security_groups: list of str or list of DBSecurityGroup objects :param security_groups: List of names of DBSecurityGroup to authorize on this DBInstance. :type preferred_maintenance_window: str :param preferred_maintenance_window: The weekly time range (in UTC) during which maintenance can occur. Default is Sun:05:00-Sun:09:00 :type master_password: str :param master_password: Password of master user for the DBInstance. Must be 4-15 alphanumeric characters. :type allocated_storage: int :param allocated_storage: The new allocated storage size, in GBs. Valid values are [5-1024] :type instance_class: str :param instance_class: The compute and memory capacity of the DBInstance. Changes will be applied at next maintenance window unless apply_immediately is True. Valid values are: * db.m1.small * db.m1.large * db.m1.xlarge * db.m2.xlarge * db.m2.2xlarge * db.m2.4xlarge :type apply_immediately: bool :param apply_immediately: If true, the modifications will be applied as soon as possible rather than waiting for the next preferred maintenance window. :type backup_retention_period: int :param backup_retention_period: The number of days for which automated backups are retained. Setting this to zero disables automated backups. :type preferred_backup_window: str :param preferred_backup_window: The daily time range during which automated backups are created (if enabled). Must be in h24:mi-hh24:mi format (UTC). :type multi_az: bool :param multi_az: If True, specifies the DB Instance will be deployed in multiple availability zones. :rtype: :class:`boto.rds.dbinstance.DBInstance` :return: The modified db instance. """ params = {'DBInstanceIdentifier' : id} if param_group: params['DBParameterGroupName'] = param_group if security_groups: l = [] for group in security_groups: if isinstance(group, DBSecurityGroup): l.append(group.name) else: l.append(group) self.build_list_params(params, l, 'DBSecurityGroups.member') if preferred_maintenance_window: params['PreferredMaintenanceWindow'] = preferred_maintenance_window if master_password: params['MasterUserPassword'] = master_password if allocated_storage: params['AllocatedStorage'] = allocated_storage if instance_class: params['DBInstanceClass'] = instance_class if backup_retention_period is not None: params['BackupRetentionPeriod'] = backup_retention_period if preferred_backup_window: params['PreferredBackupWindow'] = preferred_backup_window if multi_az: params['MultiAZ'] = 'true' if apply_immediately: params['ApplyImmediately'] = 'true' return self.get_object('ModifyDBInstance', params, DBInstance) def delete_dbinstance(self, id, skip_final_snapshot=False, final_snapshot_id=''): """ Delete an existing DBInstance. :type id: str :param id: Unique identifier for the new instance. :type skip_final_snapshot: bool :param skip_final_snapshot: This parameter determines whether a final db snapshot is created before the instance is deleted. If True, no snapshot is created. If False, a snapshot is created before deleting the instance. :type final_snapshot_id: str :param final_snapshot_id: If a final snapshot is requested, this is the identifier used for that snapshot. :rtype: :class:`boto.rds.dbinstance.DBInstance` :return: The deleted db instance. """ params = {'DBInstanceIdentifier' : id} if skip_final_snapshot: params['SkipFinalSnapshot'] = 'true' else: params['SkipFinalSnapshot'] = 'false' params['FinalDBSnapshotIdentifier'] = final_snapshot_id return self.get_object('DeleteDBInstance', params, DBInstance) def reboot_dbinstance(self, id): """ Reboot DBInstance. :type id: str :param id: Unique identifier of the instance. :rtype: :class:`boto.rds.dbinstance.DBInstance` :return: The rebooting db instance. """ params = {'DBInstanceIdentifier' : id} return self.get_object('RebootDBInstance', params, DBInstance) # DBParameterGroup methods def get_all_dbparameter_groups(self, groupname=None, max_records=None, marker=None): """ Get all parameter groups associated with your account in a region. :type groupname: str :param groupname: The name of the DBParameter group to retrieve. If not provided, all DBParameter groups will be returned. :type max_records: int :param max_records: The maximum number of records to be returned. If more results are available, a MoreToken will be returned in the response that can be used to retrieve additional records. Default is 100. :type marker: str :param marker: The marker provided by a previous request. :rtype: list :return: A list of :class:`boto.ec2.parametergroup.ParameterGroup` """ params = {} if groupname: params['DBParameterGroupName'] = groupname if max_records: params['MaxRecords'] = max_records if marker: params['Marker'] = marker return self.get_list('DescribeDBParameterGroups', params, [('DBParameterGroup', ParameterGroup)]) def get_all_dbparameters(self, groupname, source=None, max_records=None, marker=None): """ Get all parameters associated with a ParameterGroup :type groupname: str :param groupname: The name of the DBParameter group to retrieve. :type source: str :param source: Specifies which parameters to return. If not specified, all parameters will be returned. Valid values are: user|system|engine-default :type max_records: int :param max_records: The maximum number of records to be returned. If more results are available, a MoreToken will be returned in the response that can be used to retrieve additional records. Default is 100. :type marker: str :param marker: The marker provided by a previous request. :rtype: :class:`boto.ec2.parametergroup.ParameterGroup` :return: The ParameterGroup """ params = {'DBParameterGroupName' : groupname} if source: params['Source'] = source if max_records: params['MaxRecords'] = max_records if marker: params['Marker'] = marker pg = self.get_object('DescribeDBParameters', params, ParameterGroup) pg.name = groupname return pg def create_parameter_group(self, name, engine='MySQL5.1', description=''): """ Create a new dbparameter group for your account. :type name: string :param name: The name of the new dbparameter group :type engine: str :param engine: Name of database engine. Must be MySQL5.1 for now. :type description: string :param description: The description of the new security group :rtype: :class:`boto.rds.dbsecuritygroup.DBSecurityGroup` :return: The newly created DBSecurityGroup """ params = {'DBParameterGroupName': name, 'Engine': engine, 'Description' : description} return self.get_object('CreateDBParameterGroup', params, ParameterGroup) def modify_parameter_group(self, name, parameters=None): """ Modify a parameter group for your account. :type name: string :param name: The name of the new parameter group :type parameters: list of :class:`boto.rds.parametergroup.Parameter` :param parameters: The new parameters :rtype: :class:`boto.rds.parametergroup.ParameterGroup` :return: The newly created ParameterGroup """ params = {'DBParameterGroupName': name} for i in range(0, len(parameters)): parameter = parameters[i] parameter.merge(params, i+1) return self.get_list('ModifyDBParameterGroup', params, ParameterGroup, verb='POST') def reset_parameter_group(self, name, reset_all_params=False, parameters=None): """ Resets some or all of the parameters of a ParameterGroup to the default value :type key_name: string :param key_name: The name of the ParameterGroup to reset :type parameters: list of :class:`boto.rds.parametergroup.Parameter` :param parameters: The parameters to reset. If not supplied, all parameters will be reset. """ params = {'DBParameterGroupName':name} if reset_all_params: params['ResetAllParameters'] = 'true' else: params['ResetAllParameters'] = 'false' for i in range(0, len(parameters)): parameter = parameters[i] parameter.merge(params, i+1) return self.get_status('ResetDBParameterGroup', params) def delete_parameter_group(self, name): """ Delete a DBSecurityGroup from your account. :type key_name: string :param key_name: The name of the DBSecurityGroup to delete """ params = {'DBParameterGroupName':name} return self.get_status('DeleteDBParameterGroup', params) # DBSecurityGroup methods def get_all_dbsecurity_groups(self, groupname=None, max_records=None, marker=None): """ Get all security groups associated with your account in a region. :type groupnames: list :param groupnames: A list of the names of security groups to retrieve. If not provided, all security groups will be returned. :type max_records: int :param max_records: The maximum number of records to be returned. If more results are available, a MoreToken will be returned in the response that can be used to retrieve additional records. Default is 100. :type marker: str :param marker: The marker provided by a previous request. :rtype: list :return: A list of :class:`boto.rds.dbsecuritygroup.DBSecurityGroup` """ params = {} if groupname: params['DBSecurityGroupName'] = groupname if max_records: params['MaxRecords'] = max_records if marker: params['Marker'] = marker return self.get_list('DescribeDBSecurityGroups', params, [('DBSecurityGroup', DBSecurityGroup)]) def create_dbsecurity_group(self, name, description=None): """ Create a new security group for your account. This will create the security group within the region you are currently connected to. :type name: string :param name: The name of the new security group :type description: string :param description: The description of the new security group :rtype: :class:`boto.rds.dbsecuritygroup.DBSecurityGroup` :return: The newly created DBSecurityGroup """ params = {'DBSecurityGroupName':name} if description: params['DBSecurityGroupDescription'] = description group = self.get_object('CreateDBSecurityGroup', params, DBSecurityGroup) group.name = name group.description = description return group def delete_dbsecurity_group(self, name): """ Delete a DBSecurityGroup from your account. :type key_name: string :param key_name: The name of the DBSecurityGroup to delete """ params = {'DBSecurityGroupName':name} return self.get_status('DeleteDBSecurityGroup', params) def authorize_dbsecurity_group(self, group_name, cidr_ip=None, ec2_security_group_name=None, ec2_security_group_owner_id=None): """ Add a new rule to an existing security group. You need to pass in either src_security_group_name and src_security_group_owner_id OR a CIDR block but not both. :type group_name: string :param group_name: The name of the security group you are adding the rule to. :type ec2_security_group_name: string :param ec2_security_group_name: The name of the EC2 security group you are granting access to. :type ec2_security_group_owner_id: string :param ec2_security_group_owner_id: The ID of the owner of the EC2 security group you are granting access to. :type cidr_ip: string :param cidr_ip: The CIDR block you are providing access to. See http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing :rtype: bool :return: True if successful. """ params = {'DBSecurityGroupName':group_name} if ec2_security_group_name: params['EC2SecurityGroupName'] = ec2_security_group_name if ec2_security_group_owner_id: params['EC2SecurityGroupOwnerId'] = ec2_security_group_owner_id if cidr_ip: params['CIDRIP'] = urllib.quote(cidr_ip) return self.get_object('AuthorizeDBSecurityGroupIngress', params, DBSecurityGroup) def revoke_dbsecurity_group(self, group_name, ec2_security_group_name=None, ec2_security_group_owner_id=None, cidr_ip=None): """ Remove an existing rule from an existing security group. You need to pass in either ec2_security_group_name and ec2_security_group_owner_id OR a CIDR block. :type group_name: string :param group_name: The name of the security group you are removing the rule from. :type ec2_security_group_name: string :param ec2_security_group_name: The name of the EC2 security group from which you are removing access. :type ec2_security_group_owner_id: string :param ec2_security_group_owner_id: The ID of the owner of the EC2 security from which you are removing access. :type cidr_ip: string :param cidr_ip: The CIDR block from which you are removing access. See http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing :rtype: bool :return: True if successful. """ params = {'DBSecurityGroupName':group_name} if ec2_security_group_name: params['EC2SecurityGroupName'] = ec2_security_group_name if ec2_security_group_owner_id: params['EC2SecurityGroupOwnerId'] = ec2_security_group_owner_id if cidr_ip: params['CIDRIP'] = cidr_ip return self.get_object('RevokeDBSecurityGroupIngress', params, DBSecurityGroup) # For backwards compatibility. This method was improperly named # in previous versions. I have renamed it to match the others. revoke_security_group = revoke_dbsecurity_group # DBSnapshot methods def get_all_dbsnapshots(self, snapshot_id=None, instance_id=None, max_records=None, marker=None): """ Get information about DB Snapshots. :type snapshot_id: str :param snapshot_id: The unique identifier of an RDS snapshot. If not provided, all RDS snapshots will be returned. :type instance_id: str :param instance_id: The identifier of a DBInstance. If provided, only the DBSnapshots related to that instance will be returned. If not provided, all RDS snapshots will be returned. :type max_records: int :param max_records: The maximum number of records to be returned. If more results are available, a MoreToken will be returned in the response that can be used to retrieve additional records. Default is 100. :type marker: str :param marker: The marker provided by a previous request. :rtype: list :return: A list of :class:`boto.rds.dbsnapshot.DBSnapshot` """ params = {} if snapshot_id: params['DBSnapshotIdentifier'] = snapshot_id if instance_id: params['DBInstanceIdentifier'] = instance_id if max_records: params['MaxRecords'] = max_records if marker: params['Marker'] = marker return self.get_list('DescribeDBSnapshots', params, [('DBSnapshot', DBSnapshot)]) def create_dbsnapshot(self, snapshot_id, dbinstance_id): """ Create a new DB snapshot. :type snapshot_id: string :param snapshot_id: The identifier for the DBSnapshot :type dbinstance_id: string :param dbinstance_id: The source identifier for the RDS instance from which the snapshot is created. :rtype: :class:`boto.rds.dbsnapshot.DBSnapshot` :return: The newly created DBSnapshot """ params = {'DBSnapshotIdentifier' : snapshot_id, 'DBInstanceIdentifier' : dbinstance_id} return self.get_object('CreateDBSnapshot', params, DBSnapshot) def delete_dbsnapshot(self, identifier): """ Delete a DBSnapshot :type identifier: string :param identifier: The identifier of the DBSnapshot to delete """ params = {'DBSnapshotIdentifier' : identifier} return self.get_object('DeleteDBSnapshot', params, DBSnapshot) def restore_dbinstance_from_dbsnapshot(self, identifier, instance_id, instance_class, port=None, availability_zone=None): """ Create a new DBInstance from a DB snapshot. :type identifier: string :param identifier: The identifier for the DBSnapshot :type instance_id: string :param instance_id: The source identifier for the RDS instance from which the snapshot is created. :type instance_class: str :param instance_class: The compute and memory capacity of the DBInstance. Valid values are: db.m1.small | db.m1.large | db.m1.xlarge | db.m2.2xlarge | db.m2.4xlarge :type port: int :param port: Port number on which database accepts connections. Valid values [1115-65535]. Defaults to 3306. :type availability_zone: str :param availability_zone: Name of the availability zone to place DBInstance into. :rtype: :class:`boto.rds.dbinstance.DBInstance` :return: The newly created DBInstance """ params = {'DBSnapshotIdentifier' : identifier, 'DBInstanceIdentifier' : instance_id, 'DBInstanceClass' : instance_class} if port: params['Port'] = port if availability_zone: params['AvailabilityZone'] = availability_zone return self.get_object('RestoreDBInstanceFromDBSnapshot', params, DBInstance) def restore_dbinstance_from_point_in_time(self, source_instance_id, target_instance_id, use_latest=False, restore_time=None, dbinstance_class=None, port=None, availability_zone=None): """ Create a new DBInstance from a point in time. :type source_instance_id: string :param source_instance_id: The identifier for the source DBInstance. :type target_instance_id: string :param target_instance_id: The identifier of the new DBInstance. :type use_latest: bool :param use_latest: If True, the latest snapshot availabile will be used. :type restore_time: datetime :param restore_time: The date and time to restore from. Only used if use_latest is False. :type instance_class: str :param instance_class: The compute and memory capacity of the DBInstance. Valid values are: db.m1.small | db.m1.large | db.m1.xlarge | db.m2.2xlarge | db.m2.4xlarge :type port: int :param port: Port number on which database accepts connections. Valid values [1115-65535]. Defaults to 3306. :type availability_zone: str :param availability_zone: Name of the availability zone to place DBInstance into. :rtype: :class:`boto.rds.dbinstance.DBInstance` :return: The newly created DBInstance """ params = {'SourceDBInstanceIdentifier' : source_instance_id, 'TargetDBInstanceIdentifier' : target_instance_id} if use_latest: params['UseLatestRestorableTime'] = 'true' elif restore_time: params['RestoreTime'] = restore_time.isoformat() if dbinstance_class: params['DBInstanceClass'] = dbinstance_class if port: params['Port'] = port if availability_zone: params['AvailabilityZone'] = availability_zone return self.get_object('RestoreDBInstanceToPointInTime', params, DBInstance) # Events def get_all_events(self, source_identifier=None, source_type=None, start_time=None, end_time=None, max_records=None, marker=None): """ Get information about events related to your DBInstances, DBSecurityGroups and DBParameterGroups. :type source_identifier: str :param source_identifier: If supplied, the events returned will be limited to those that apply to the identified source. The value of this parameter depends on the value of source_type. If neither parameter is specified, all events in the time span will be returned. :type source_type: str :param source_type: Specifies how the source_identifier should be interpreted. Valid values are: b-instance | db-security-group | db-parameter-group | db-snapshot :type start_time: datetime :param start_time: The beginning of the time interval for events. If not supplied, all available events will be returned. :type end_time: datetime :param end_time: The ending of the time interval for events. If not supplied, all available events will be returned. :type max_records: int :param max_records: The maximum number of records to be returned. If more results are available, a MoreToken will be returned in the response that can be used to retrieve additional records. Default is 100. :type marker: str :param marker: The marker provided by a previous request. :rtype: list :return: A list of class:`boto.rds.event.Event` """ params = {} if source_identifier and source_type: params['SourceIdentifier'] = source_identifier params['SourceType'] = source_type if start_time: params['StartTime'] = start_time.isoformat() if end_time: params['EndTime'] = end_time.isoformat() if max_records: params['MaxRecords'] = max_records if marker: params['Marker'] = marker return self.get_list('DescribeEvents', params, [('Event', Event)]) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/rds/dbinstance.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.rds.dbsecuritygroup import DBSecurityGroup from boto.rds.parametergroup import ParameterGroup class DBInstance(object): """ Represents a RDS DBInstance """ def __init__(self, connection=None, id=None): self.connection = connection self.id = id self.create_time = None self.engine = None self.status = None self.allocated_storage = None self.endpoint = None self.instance_class = None self.master_username = None self.parameter_group = None self.security_group = None self.availability_zone = None self.backup_retention_period = None self.preferred_backup_window = None self.preferred_maintenance_window = None self.latest_restorable_time = None self.multi_az = False self.pending_modified_values = None self._in_endpoint = False self._port = None self._address = None def __repr__(self): return 'DBInstance:%s' % self.id def startElement(self, name, attrs, connection): if name == 'Endpoint': self._in_endpoint = True elif name == 'DBParameterGroup': self.parameter_group = ParameterGroup(self.connection) return self.parameter_group elif name == 'DBSecurityGroup': self.security_group = DBSecurityGroup(self.connection) return self.security_group elif name == 'PendingModifiedValues': self.pending_modified_values = PendingModifiedValues() return self.pending_modified_values return None def endElement(self, name, value, connection): if name == 'DBInstanceIdentifier': self.id = value elif name == 'DBInstanceStatus': self.status = value elif name == 'InstanceCreateTime': self.create_time = value elif name == 'Engine': self.engine = value elif name == 'DBInstanceStatus': self.status = value elif name == 'AllocatedStorage': self.allocated_storage = int(value) elif name == 'DBInstanceClass': self.instance_class = value elif name == 'MasterUsername': self.master_username = value elif name == 'Port': if self._in_endpoint: self._port = int(value) elif name == 'Address': if self._in_endpoint: self._address = value elif name == 'Endpoint': self.endpoint = (self._address, self._port) self._in_endpoint = False elif name == 'AvailabilityZone': self.availability_zone = value elif name == 'BackupRetentionPeriod': self.backup_retention_period = value elif name == 'LatestRestorableTime': self.latest_restorable_time = value elif name == 'PreferredMaintenanceWindow': self.preferred_maintenance_window = value elif name == 'PreferredBackupWindow': self.preferred_backup_window = value elif name == 'MultiAZ': if value.lower() == 'true': self.multi_az = True else: setattr(self, name, value) def snapshot(self, snapshot_id): """ Create a new DB snapshot of this DBInstance. :type identifier: string :param identifier: The identifier for the DBSnapshot :rtype: :class:`boto.rds.dbsnapshot.DBSnapshot` :return: The newly created DBSnapshot """ return self.connection.create_dbsnapshot(snapshot_id, self.id) def reboot(self): """ Reboot this DBInstance :rtype: :class:`boto.rds.dbsnapshot.DBSnapshot` :return: The newly created DBSnapshot """ return self.connection.reboot_dbinstance(self.id) def update(self, validate=False): """ Update the DB instance's status information by making a call to fetch the current instance attributes from the service. :type validate: bool :param validate: By default, if EC2 returns no data about the instance the update method returns quietly. If the validate param is True, however, it will raise a ValueError exception if no data is returned from EC2. """ rs = self.connection.get_all_dbinstances(self.id) if len(rs) > 0: for i in rs: if i.id == self.id: self.__dict__.update(i.__dict__) elif validate: raise ValueError('%s is not a valid Instance ID' % self.id) return self.status def stop(self, skip_final_snapshot=False, final_snapshot_id=''): """ Delete this DBInstance. :type skip_final_snapshot: bool :param skip_final_snapshot: This parameter determines whether a final db snapshot is created before the instance is deleted. If True, no snapshot is created. If False, a snapshot is created before deleting the instance. :type final_snapshot_id: str :param final_snapshot_id: If a final snapshot is requested, this is the identifier used for that snapshot. :rtype: :class:`boto.rds.dbinstance.DBInstance` :return: The deleted db instance. """ return self.connection.delete_dbinstance(self.id, skip_final_snapshot, final_snapshot_id) def modify(self, param_group=None, security_groups=None, preferred_maintenance_window=None, master_password=None, allocated_storage=None, instance_class=None, backup_retention_period=None, preferred_backup_window=None, multi_az=False, apply_immediately=False): """ Modify this DBInstance. :type security_groups: list of str or list of DBSecurityGroup objects :param security_groups: List of names of DBSecurityGroup to authorize on this DBInstance. :type preferred_maintenance_window: str :param preferred_maintenance_window: The weekly time range (in UTC) during which maintenance can occur. Default is Sun:05:00-Sun:09:00 :type master_password: str :param master_password: Password of master user for the DBInstance. Must be 4-15 alphanumeric characters. :type allocated_storage: int :param allocated_storage: The new allocated storage size, in GBs. Valid values are [5-1024] :type instance_class: str :param instance_class: The compute and memory capacity of the DBInstance. Changes will be applied at next maintenance window unless apply_immediately is True. Valid values are: * db.m1.small * db.m1.large * db.m1.xlarge * db.m2.xlarge * db.m2.2xlarge * db.m2.4xlarge :type apply_immediately: bool :param apply_immediately: If true, the modifications will be applied as soon as possible rather than waiting for the next preferred maintenance window. :type backup_retention_period: int :param backup_retention_period: The number of days for which automated backups are retained. Setting this to zero disables automated backups. :type preferred_backup_window: str :param preferred_backup_window: The daily time range during which automated backups are created (if enabled). Must be in h24:mi-hh24:mi format (UTC). :type multi_az: bool :param multi_az: If True, specifies the DB Instance will be deployed in multiple availability zones. :rtype: :class:`boto.rds.dbinstance.DBInstance` :return: The modified db instance. """ return self.connection.modify_dbinstance(self.id, param_group, security_groups, preferred_maintenance_window, master_password, allocated_storage, instance_class, backup_retention_period, preferred_backup_window, multi_az, apply_immediately) class PendingModifiedValues(dict): def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name != 'PendingModifiedValues': self[name] = value ================================================ FILE: deploy/third_party/boto-2.1.1/boto/rds/dbsecuritygroup.py ================================================ # Copyright (c) 2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an DBSecurityGroup """ from boto.ec2.securitygroup import SecurityGroup class DBSecurityGroup(object): def __init__(self, connection=None, owner_id=None, name=None, description=None): self.connection = connection self.owner_id = owner_id self.name = name self.description = description self.ec2_groups = [] self.ip_ranges = [] def __repr__(self): return 'DBSecurityGroup:%s' % self.name def startElement(self, name, attrs, connection): if name == 'IPRange': cidr = IPRange(self) self.ip_ranges.append(cidr) return cidr elif name == 'EC2SecurityGroup': ec2_grp = EC2SecurityGroup(self) self.ec2_groups.append(ec2_grp) return ec2_grp else: return None def endElement(self, name, value, connection): if name == 'OwnerId': self.owner_id = value elif name == 'DBSecurityGroupName': self.name = value elif name == 'DBSecurityGroupDescription': self.description = value elif name == 'IPRanges': pass else: setattr(self, name, value) def delete(self): return self.connection.delete_dbsecurity_group(self.name) def authorize(self, cidr_ip=None, ec2_group=None): """ Add a new rule to this DBSecurity group. You need to pass in either a CIDR block to authorize or and EC2 SecurityGroup. @type cidr_ip: string @param cidr_ip: A valid CIDR IP range to authorize @type ec2_group: :class:`boto.ec2.securitygroup.SecurityGroup>` @rtype: bool @return: True if successful. """ if isinstance(ec2_group, SecurityGroup): group_name = ec2_group.name group_owner_id = ec2_group.owner_id else: group_name = None group_owner_id = None return self.connection.authorize_dbsecurity_group(self.name, cidr_ip, group_name, group_owner_id) def revoke(self, cidr_ip=None, ec2_group=None): """ Revoke access to a CIDR range or EC2 SecurityGroup. You need to pass in either a CIDR block or an EC2 SecurityGroup from which to revoke access. @type cidr_ip: string @param cidr_ip: A valid CIDR IP range to revoke @type ec2_group: :class:`boto.ec2.securitygroup.SecurityGroup>` @rtype: bool @return: True if successful. """ if isinstance(ec2_group, SecurityGroup): group_name = ec2_group.name group_owner_id = ec2_group.owner_id return self.connection.revoke_dbsecurity_group( self.name, ec2_security_group_name=group_name, ec2_security_group_owner_id=group_owner_id) # Revoking by CIDR IP range return self.connection.revoke_dbsecurity_group( self.name, cidr_ip=cidr_ip) class IPRange(object): def __init__(self, parent=None): self.parent = parent self.cidr_ip = None self.status = None def __repr__(self): return 'IPRange:%s' % self.cidr_ip def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'CIDRIP': self.cidr_ip = value elif name == 'Status': self.status = value else: setattr(self, name, value) class EC2SecurityGroup(object): def __init__(self, parent=None): self.parent = parent self.name = None self.owner_id = None def __repr__(self): return 'EC2SecurityGroup:%s' % self.name def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'EC2SecurityGroupName': self.name = value elif name == 'EC2SecurityGroupOwnerId': self.owner_id = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/rds/dbsnapshot.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class DBSnapshot(object): """ Represents a RDS DB Snapshot """ def __init__(self, connection=None, id=None): self.connection = connection self.id = id self.engine = None self.snapshot_create_time = None self.instance_create_time = None self.port = None self.status = None self.availability_zone = None self.master_username = None self.allocated_storage = None self.instance_id = None self.availability_zone = None def __repr__(self): return 'DBSnapshot:%s' % self.id def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'Engine': self.engine = value elif name == 'InstanceCreateTime': self.instance_create_time = value elif name == 'SnapshotCreateTime': self.snapshot_create_time = value elif name == 'DBInstanceIdentifier': self.instance_id = value elif name == 'DBSnapshotIdentifier': self.id = value elif name == 'Port': self.port = int(value) elif name == 'Status': self.status = value elif name == 'AvailabilityZone': self.availability_zone = value elif name == 'MasterUsername': self.master_username = value elif name == 'AllocatedStorage': self.allocated_storage = int(value) elif name == 'SnapshotTime': self.time = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/rds/event.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class Event(object): def __init__(self, connection=None): self.connection = connection self.message = None self.source_identifier = None self.source_type = None self.engine = None self.date = None def __repr__(self): return '"%s"' % self.message def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'SourceIdentifier': self.source_identifier = value elif name == 'SourceType': self.source_type = value elif name == 'Message': self.message = value elif name == 'Date': self.date = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/rds/parametergroup.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class ParameterGroup(dict): def __init__(self, connection=None): dict.__init__(self) self.connection = connection self.name = None self.description = None self.engine = None self._current_param = None def __repr__(self): return 'ParameterGroup:%s' % self.name def startElement(self, name, attrs, connection): if name == 'Parameter': if self._current_param: self[self._current_param.name] = self._current_param self._current_param = Parameter(self) return self._current_param def endElement(self, name, value, connection): if name == 'DBParameterGroupName': self.name = value elif name == 'Description': self.description = value elif name == 'Engine': self.engine = value else: setattr(self, name, value) def modifiable(self): mod = [] for key in self: p = self[key] if p.is_modifiable: mod.append(p) return mod def get_params(self): pg = self.connection.get_all_dbparameters(self.name) self.update(pg) def add_param(self, name, value, apply_method): param = Parameter() param.name = name param.value = value param.apply_method = apply_method self.params.append(param) class Parameter(object): """ Represents a RDS Parameter """ ValidTypes = {'integer' : int, 'string' : str, 'boolean' : bool} ValidSources = ['user', 'system', 'engine-default'] ValidApplyTypes = ['static', 'dynamic'] ValidApplyMethods = ['immediate', 'pending-reboot'] def __init__(self, group=None, name=None): self.group = group self.name = name self._value = None self.type = str self.source = None self.is_modifiable = True self.description = None self.apply_method = None self.allowed_values = None def __repr__(self): return 'Parameter:%s' % self.name def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'ParameterName': self.name = value elif name == 'ParameterValue': self._value = value elif name == 'DataType': if value in self.ValidTypes: self.type = value elif name == 'Source': if value in self.ValidSources: self.source = value elif name == 'IsModifiable': if value.lower() == 'true': self.is_modifiable = True else: self.is_modifiable = False elif name == 'Description': self.description = value elif name == 'ApplyType': if value in self.ValidApplyTypes: self.apply_type = value elif name == 'AllowedValues': self.allowed_values = value else: setattr(self, name, value) def merge(self, d, i): prefix = 'Parameters.member.%d.' % i if self.name: d[prefix+'ParameterName'] = self.name if self._value: d[prefix+'ParameterValue'] = self._value if self.apply_type: d[prefix+'ApplyMethod'] = self.apply_method def _set_string_value(self, value): if not isinstance(value, str) or isinstance(value, unicode): raise ValueError, 'value must be of type str' if self.allowed_values: choices = self.allowed_values.split(',') if value not in choices: raise ValueError, 'value must be in %s' % self.allowed_values self._value = value def _set_integer_value(self, value): if isinstance(value, str) or isinstance(value, unicode): value = int(value) if isinstance(value, int) or isinstance(value, long): if self.allowed_values: min, max = self.allowed_values.split('-') if value < int(min) or value > int(max): raise ValueError, 'range is %s' % self.allowed_values self._value = value else: raise ValueError, 'value must be integer' def _set_boolean_value(self, value): if isinstance(value, bool): self._value = value elif isinstance(value, str) or isinstance(value, unicode): if value.lower() == 'true': self._value = True else: self._value = False else: raise ValueError, 'value must be boolean' def set_value(self, value): if self.type == 'string': self._set_string_value(value) elif self.type == 'integer': self._set_integer_value(value) elif self.type == 'boolean': self._set_boolean_value(value) else: raise TypeError, 'unknown type (%s)' % self.type def get_value(self): if self._value == None: return self._value if self.type == 'string': return self._value elif self.type == 'integer': if not isinstance(self._value, int) and not isinstance(self._value, long): self._set_integer_value(self._value) return self._value elif self.type == 'boolean': if not isinstance(self._value, bool): self._set_boolean_value(self._value) return self._value else: raise TypeError, 'unknown type (%s)' % self.type value = property(get_value, set_value, 'The value of the parameter') def apply(self, immediate=False): if immediate: self.apply_method = 'immediate' else: self.apply_method = 'pending-reboot' self.group.connection.modify_parameter_group(self.group.name, [self]) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/rds/regioninfo.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # from boto.regioninfo import RegionInfo class RDSRegionInfo(RegionInfo): def __init__(self, connection=None, name=None, endpoint=None): from boto.rds import RDSConnection RegionInfo.__init__(self, connection, name, endpoint, RDSConnection) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/regioninfo.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class RegionInfo(object): """ Represents an AWS Region """ def __init__(self, connection=None, name=None, endpoint=None, connection_cls=None): self.connection = connection self.name = name self.endpoint = endpoint self.connection_cls = connection_cls def __repr__(self): return 'RegionInfo:%s' % self.name def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'regionName': self.name = value elif name == 'regionEndpoint': self.endpoint = value else: setattr(self, name, value) def connect(self, **kw_params): """ Connect to this Region's endpoint. Returns an connection object pointing to the endpoint associated with this region. You may pass any of the arguments accepted by the connection class's constructor as keyword arguments and they will be passed along to the connection object. :rtype: Connection object :return: The connection to this regions endpoint """ if self.connection_cls: return self.connection_cls(region=self, **kw_params) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/resultset.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class ResultSet(list): """ The ResultSet is used to pass results back from the Amazon services to the client. It is light wrapper around Python's :py:class:`list` class, with some additional methods for parsing XML results from AWS. Because I don't really want any dependencies on external libraries, I'm using the standard SAX parser that comes with Python. The good news is that it's quite fast and efficient but it makes some things rather difficult. You can pass in, as the marker_elem parameter, a list of tuples. Each tuple contains a string as the first element which represents the XML element that the resultset needs to be on the lookout for and a Python class as the second element of the tuple. Each time the specified element is found in the XML, a new instance of the class will be created and popped onto the stack. :ivar str next_token: A hash used to assist in paging through very long result sets. In most cases, passing this value to certain methods will give you another 'page' of results. """ def __init__(self, marker_elem=None): list.__init__(self) if isinstance(marker_elem, list): self.markers = marker_elem else: self.markers = [] self.marker = None self.key_marker = None self.next_key_marker = None self.next_version_id_marker = None self.version_id_marker = None self.is_truncated = False self.next_token = None self.status = True def startElement(self, name, attrs, connection): for t in self.markers: if name == t[0]: obj = t[1](connection) self.append(obj) return obj return None def to_boolean(self, value, true_value='true'): if value == true_value: return True else: return False def endElement(self, name, value, connection): if name == 'IsTruncated': self.is_truncated = self.to_boolean(value) elif name == 'Marker': self.marker = value elif name == 'KeyMarker': self.key_marker = value elif name == 'NextKeyMarker': self.next_key_marker = value elif name == 'VersionIdMarker': self.version_id_marker = value elif name == 'NextVersionIdMarker': self.next_version_id_marker = value elif name == 'UploadIdMarker': self.upload_id_marker = value elif name == 'NextUploadIdMarker': self.next_upload_id_marker = value elif name == 'Bucket': self.bucket = value elif name == 'MaxUploads': self.max_uploads = int(value) elif name == 'Prefix': self.prefix = value elif name == 'return': self.status = self.to_boolean(value) elif name == 'StatusCode': self.status = self.to_boolean(value, 'Success') elif name == 'ItemName': self.append(value) elif name == 'NextToken': self.next_token = value elif name == 'BoxUsage': try: connection.box_usage += float(value) except: pass elif name == 'IsValid': self.status = self.to_boolean(value, 'True') else: setattr(self, name, value) class BooleanResult(object): def __init__(self, marker_elem=None): self.status = True self.request_id = None self.box_usage = None def __repr__(self): if self.status: return 'True' else: return 'False' def __nonzero__(self): return self.status def startElement(self, name, attrs, connection): return None def to_boolean(self, value, true_value='true'): if value == true_value: return True else: return False def endElement(self, name, value, connection): if name == 'return': self.status = self.to_boolean(value) elif name == 'StatusCode': self.status = self.to_boolean(value, 'Success') elif name == 'IsValid': self.status = self.to_boolean(value, 'True') elif name == 'RequestId': self.request_id = value elif name == 'requestId': self.request_id = value elif name == 'BoxUsage': self.request_id = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/roboto/__init__.py ================================================ # ================================================ FILE: deploy/third_party/boto-2.1.1/boto/roboto/awsqueryrequest.py ================================================ # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import sys import os import boto import optparse import copy import boto.exception import boto.roboto.awsqueryservice import bdb import traceback try: import epdb as debugger except ImportError: import pdb as debugger def boto_except_hook(debugger_flag, debug_flag): def excepthook(typ, value, tb): if typ is bdb.BdbQuit: sys.exit(1) sys.excepthook = sys.__excepthook__ if debugger_flag and sys.stdout.isatty() and sys.stdin.isatty(): if debugger.__name__ == 'epdb': debugger.post_mortem(tb, typ, value) else: debugger.post_mortem(tb) elif debug_flag: print traceback.print_tb(tb) sys.exit(1) else: print value sys.exit(1) return excepthook class Line(object): def __init__(self, fmt, data, label): self.fmt = fmt self.data = data self.label = label self.line = '%s\t' % label self.printed = False def append(self, datum): self.line += '%s\t' % datum def print_it(self): if not self.printed: print self.line self.printed = True class RequiredParamError(boto.exception.BotoClientError): def __init__(self, required): self.required = required s = 'Required parameters are missing: %s' % self.required boto.exception.BotoClientError.__init__(self, s) class EncoderError(boto.exception.BotoClientError): def __init__(self, error_msg): s = 'Error encoding value (%s)' % error_msg boto.exception.BotoClientError.__init__(self, s) class FilterError(boto.exception.BotoClientError): def __init__(self, filters): self.filters = filters s = 'Unknown filters: %s' % self.filters boto.exception.BotoClientError.__init__(self, s) class Encoder: @classmethod def encode(cls, p, rp, v, label=None): if p.name.startswith('_'): return try: mthd = getattr(cls, 'encode_'+p.ptype) mthd(p, rp, v, label) except AttributeError: raise EncoderError('Unknown type: %s' % p.ptype) @classmethod def encode_string(cls, p, rp, v, l): if l: label = l else: label = p.name rp[label] = v encode_file = encode_string encode_enum = encode_string @classmethod def encode_integer(cls, p, rp, v, l): if l: label = l else: label = p.name rp[label] = '%d' % v @classmethod def encode_boolean(cls, p, rp, v, l): if l: label = l else: label = p.name if v: v = 'true' else: v = 'false' rp[label] = v @classmethod def encode_datetime(cls, p, rp, v, l): if l: label = l else: label = p.name rp[label] = v @classmethod def encode_array(cls, p, rp, v, l): v = boto.utils.mklist(v) if l: label = l else: label = p.name label = label + '.%d' for i, value in enumerate(v): rp[label%(i+1)] = value class AWSQueryRequest(object): ServiceClass = None Description = '' Params = [] Args = [] Filters = [] Response = {} CLITypeMap = {'string' : 'string', 'integer' : 'int', 'int' : 'int', 'enum' : 'choice', 'datetime' : 'string', 'dateTime' : 'string', 'file' : 'string', 'boolean' : None} @classmethod def name(cls): return cls.__name__ def __init__(self, **args): self.args = args self.parser = None self.cli_options = None self.cli_args = None self.cli_output_format = None self.connection = None self.list_markers = [] self.item_markers = [] self.request_params = {} self.connection_args = None def __repr__(self): return self.name() def get_connection(self, **args): if self.connection is None: self.connection = self.ServiceClass(**args) return self.connection @property def status(self): retval = None if self.http_response is not None: retval = self.http_response.status return retval @property def reason(self): retval = None if self.http_response is not None: retval = self.http_response.reason return retval @property def request_id(self): retval = None if self.aws_response is not None: retval = getattr(self.aws_response, 'requestId') return retval def process_filters(self): filters = self.args.get('filters', []) filter_names = [f['name'] for f in self.Filters] unknown_filters = [f for f in filters if f not in filter_names] if unknown_filters: raise FilterError, 'Unknown filters: %s' % unknown_filters for i, filter in enumerate(self.Filters): name = filter['name'] if name in filters: self.request_params['Filter.%d.Name' % (i+1)] = name for j, value in enumerate(boto.utils.mklist(filters[name])): Encoder.encode(filter, self.request_params, value, 'Filter.%d.Value.%d' % (i+1,j+1)) def process_args(self, **args): """ Responsible for walking through Params defined for the request and: * Matching them with keyword parameters passed to the request constructor or via the command line. * Checking to see if all required parameters have been specified and raising an exception, if not. * Encoding each value into the set of request parameters that will be sent in the request to the AWS service. """ self.args.update(args) self.connection_args = copy.copy(self.args) if 'debug' in self.args and self.args['debug'] >= 2: boto.set_stream_logger(self.name()) required = [p.name for p in self.Params+self.Args if not p.optional] for param in self.Params+self.Args: if param.long_name: python_name = param.long_name.replace('-', '_') else: python_name = boto.utils.pythonize_name(param.name, '_') value = None if python_name in self.args: value = self.args[python_name] if value is None: value = param.default if value is not None: if param.name in required: required.remove(param.name) if param.request_param: if param.encoder: param.encoder(param, self.request_params, value) else: Encoder.encode(param, self.request_params, value) if python_name in self.args: del self.connection_args[python_name] if required: l = [] for p in self.Params+self.Args: if p.name in required: if p.short_name and p.long_name: l.append('(%s, %s)' % (p.optparse_short_name, p.optparse_long_name)) elif p.short_name: l.append('(%s)' % p.optparse_short_name) else: l.append('(%s)' % p.optparse_long_name) raise RequiredParamError(','.join(l)) boto.log.debug('request_params: %s' % self.request_params) self.process_markers(self.Response) def process_markers(self, fmt, prev_name=None): if fmt and fmt['type'] == 'object': for prop in fmt['properties']: self.process_markers(prop, fmt['name']) elif fmt and fmt['type'] == 'array': self.list_markers.append(prev_name) self.item_markers.append(fmt['name']) def send(self, verb='GET', **args): self.process_args(**args) self.process_filters() conn = self.get_connection(**self.connection_args) self.http_response = conn.make_request(self.name(), self.request_params, verb=verb) self.body = self.http_response.read() boto.log.debug(self.body) if self.http_response.status == 200: self.aws_response = boto.jsonresponse.Element(list_marker=self.list_markers, item_marker=self.item_markers) h = boto.jsonresponse.XmlHandler(self.aws_response, self) h.parse(self.body) return self.aws_response else: boto.log.error('%s %s' % (self.http_response.status, self.http_response.reason)) boto.log.error('%s' % self.body) raise conn.ResponseError(self.http_response.status, self.http_response.reason, self.body) def add_standard_options(self): group = optparse.OptionGroup(self.parser, 'Standard Options') # add standard options that all commands get group.add_option('-D', '--debug', action='store_true', help='Turn on all debugging output') group.add_option('--debugger', action='store_true', default=False, help='Enable interactive debugger on error') group.add_option('-U', '--url', action='store', help='Override service URL with value provided') group.add_option('--region', action='store', help='Name of the region to connect to') group.add_option('-I', '--access-key-id', action='store', help='Override access key value') group.add_option('-S', '--secret-key', action='store', help='Override secret key value') group.add_option('--version', action='store_true', help='Display version string') if self.Filters: self.group.add_option('--help-filters', action='store_true', help='Display list of available filters') self.group.add_option('--filter', action='append', metavar=' name=value', help='A filter for limiting the results') self.parser.add_option_group(group) def process_standard_options(self, options, args, d): if hasattr(options, 'help_filters') and options.help_filters: print 'Available filters:' for filter in self.Filters: print '%s\t%s' % (filter.name, filter.doc) sys.exit(0) if options.debug: self.args['debug'] = 2 if options.url: self.args['url'] = options.url if options.region: self.args['region'] = options.region if options.access_key_id: self.args['aws_access_key_id'] = options.access_key_id if options.secret_key: self.args['aws_secret_access_key'] = options.secret_key if options.version: # TODO - Where should the version # come from? print 'version x.xx' exit(0) sys.excepthook = boto_except_hook(options.debugger, options.debug) def get_usage(self): s = 'usage: %prog [options] ' l = [ a.long_name for a in self.Args ] s += ' '.join(l) for a in self.Args: if a.doc: s += '\n\n\t%s - %s' % (a.long_name, a.doc) return s def build_cli_parser(self): self.parser = optparse.OptionParser(description=self.Description, usage=self.get_usage()) self.add_standard_options() for param in self.Params: ptype = action = choices = None if param.ptype in self.CLITypeMap: ptype = self.CLITypeMap[param.ptype] action = 'store' if param.ptype == 'boolean': action = 'store_true' elif param.ptype == 'array': if len(param.items) == 1: ptype = param.items[0]['type'] action = 'append' elif param.cardinality != 1: action = 'append' if ptype or action == 'store_true': if param.short_name: self.parser.add_option(param.optparse_short_name, param.optparse_long_name, action=action, type=ptype, choices=param.choices, help=param.doc) elif param.long_name: self.parser.add_option(param.optparse_long_name, action=action, type=ptype, choices=param.choices, help=param.doc) def do_cli(self): if not self.parser: self.build_cli_parser() self.cli_options, self.cli_args = self.parser.parse_args() d = {} self.process_standard_options(self.cli_options, self.cli_args, d) for param in self.Params: if param.long_name: p_name = param.long_name.replace('-', '_') else: p_name = boto.utils.pythonize_name(param.name) value = getattr(self.cli_options, p_name) if param.ptype == 'file' and value: if value == '-': value = sys.stdin.read() else: path = os.path.expanduser(value) path = os.path.expandvars(path) if os.path.isfile(path): fp = open(path) value = fp.read() fp.close() else: self.parser.error('Unable to read file: %s' % path) d[p_name] = value for arg in self.Args: if arg.long_name: p_name = arg.long_name.replace('-', '_') else: p_name = boto.utils.pythonize_name(arg.name) value = None if arg.cardinality == 1: if len(self.cli_args) >= 1: value = self.cli_args[0] else: value = self.cli_args d[p_name] = value self.args.update(d) if hasattr(self.cli_options, 'filter') and self.cli_options.filter: d = {} for filter in self.cli_options.filter: name, value = filter.split('=') d[name] = value if 'filters' in self.args: self.args['filters'].update(d) else: self.args['filters'] = d try: response = self.main() self.cli_formatter(response) except RequiredParamError, e: print e sys.exit(1) except self.ServiceClass.ResponseError, err: print 'Error(%s): %s' % (err.error_code, err.error_message) sys.exit(1) except boto.roboto.awsqueryservice.NoCredentialsError, err: print 'Unable to find credentials.' sys.exit(1) except Exception, e: print e sys.exit(1) def _generic_cli_formatter(self, fmt, data, label=''): if fmt['type'] == 'object': for prop in fmt['properties']: if 'name' in fmt: if fmt['name'] in data: data = data[fmt['name']] if fmt['name'] in self.list_markers: label = fmt['name'] if label[-1] == 's': label = label[0:-1] label = label.upper() self._generic_cli_formatter(prop, data, label) elif fmt['type'] == 'array': for item in data: line = Line(fmt, item, label) if isinstance(item, dict): for field_name in item: line.append(item[field_name]) elif isinstance(item, basestring): line.append(item) line.print_it() def cli_formatter(self, data): """ This method is responsible for formatting the output for the command line interface. The default behavior is to call the generic CLI formatter which attempts to print something reasonable. If you want specific formatting, you should override this method and do your own thing. :type data: dict :param data: The data returned by AWS. """ if data: self._generic_cli_formatter(self.Response, data) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/roboto/awsqueryservice.py ================================================ import os import urlparse import boto import boto.connection import boto.jsonresponse import boto.exception import awsqueryrequest class NoCredentialsError(boto.exception.BotoClientError): def __init__(self): s = 'Unable to find credentials' boto.exception.BotoClientError.__init__(self, s) class AWSQueryService(boto.connection.AWSQueryConnection): Name = '' Description = '' APIVersion = '' Authentication = 'sign-v2' Path = '/' Port = 443 Provider = 'aws' EnvURL = 'AWS_URL' Regions = [] def __init__(self, **args): self.args = args self.check_for_credential_file() self.check_for_env_url() if 'host' not in self.args: if self.Regions: region_name = self.args.get('region_name', self.Regions[0]['name']) for region in self.Regions: if region['name'] == region_name: self.args['host'] = region['endpoint'] if 'path' not in self.args: self.args['path'] = self.Path if 'port' not in self.args: self.args['port'] = self.Port try: boto.connection.AWSQueryConnection.__init__(self, **self.args) self.aws_response = None except boto.exception.NoAuthHandlerFound: raise NoCredentialsError() def check_for_credential_file(self): """ Checks for the existance of an AWS credential file. If the environment variable AWS_CREDENTIAL_FILE is set and points to a file, that file will be read and will be searched credentials. Note that if credentials have been explicitelypassed into the class constructor, those values always take precedence. """ if 'AWS_CREDENTIAL_FILE' in os.environ: path = os.environ['AWS_CREDENTIAL_FILE'] path = os.path.expanduser(path) path = os.path.expandvars(path) if os.path.isfile(path): fp = open(path) lines = fp.readlines() fp.close() for line in lines: if line[0] != '#': if '=' in line: name, value = line.split('=', 1) if name.strip() == 'AWSAccessKeyId': if 'aws_access_key_id' not in self.args: value = value.strip() self.args['aws_access_key_id'] = value elif name.strip() == 'AWSSecretKey': if 'aws_secret_access_key' not in self.args: value = value.strip() self.args['aws_secret_access_key'] = value else: print 'Warning: unable to read AWS_CREDENTIAL_FILE' def check_for_env_url(self): """ First checks to see if a url argument was explicitly passed in. If so, that will be used. If not, it checks for the existence of the environment variable specified in ENV_URL. If this is set, it should contain a fully qualified URL to the service you want to use. Note that any values passed explicitly to the class constructor will take precedence. """ url = self.args.get('url', None) if url: del self.args['url'] if not url and self.EnvURL in os.environ: url = os.environ[self.EnvURL] if url: rslt = urlparse.urlparse(url) if 'is_secure' not in self.args: if rslt.scheme == 'https': self.args['is_secure'] = True else: self.args['is_secure'] = False host = rslt.netloc port = None l = host.split(':') if len(l) > 1: host = l[0] port = int(l[1]) if 'host' not in self.args: self.args['host'] = host if port and 'port' not in self.args: self.args['port'] = port if rslt.path and 'path' not in self.args: self.args['path'] = rslt.path def _required_auth_capability(self): return [self.Authentication] ================================================ FILE: deploy/third_party/boto-2.1.1/boto/roboto/param.py ================================================ # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import os class Converter(object): @classmethod def convert_string(cls, param, value): # TODO: could do length validation, etc. here if not isinstance(value, basestring): raise ValueError return value @classmethod def convert_integer(cls, param, value): # TODO: could do range checking here return int(value) @classmethod def convert_boolean(cls, param, value): """ For command line arguments, just the presence of the option means True so just return True """ return True @classmethod def convert_file(cls, param, value): if os.path.isfile(value): return value raise ValueError @classmethod def convert_dir(cls, param, value): if os.path.isdir(value): return value raise ValueError @classmethod def convert(cls, param, value): try: if hasattr(cls, 'convert_'+param.ptype): mthd = getattr(cls, 'convert_'+param.ptype) else: mthd = cls.convert_string return mthd(param, value) except: raise ValidationException(param, '') class Param(object): def __init__(self, name=None, ptype='string', optional=True, short_name=None, long_name=None, doc='', metavar=None, cardinality=1, default=None, choices=None, encoder=None, request_param=True): self.name = name self.ptype = ptype self.optional = optional self.short_name = short_name self.long_name = long_name self.doc = doc self.metavar = metavar self.cardinality = cardinality self.default = default self.choices = choices self.encoder = encoder self.request_param = request_param @property def optparse_long_name(self): ln = None if self.long_name: ln = '--%s' % self.long_name return ln @property def synopsis_long_name(self): ln = None if self.long_name: ln = '--%s' % self.long_name return ln @property def getopt_long_name(self): ln = None if self.long_name: ln = '%s' % self.long_name if self.ptype != 'boolean': ln += '=' return ln @property def optparse_short_name(self): sn = None if self.short_name: sn = '-%s' % self.short_name return sn @property def synopsis_short_name(self): sn = None if self.short_name: sn = '-%s' % self.short_name return sn @property def getopt_short_name(self): sn = None if self.short_name: sn = '%s' % self.short_name if self.ptype != 'boolean': sn += ':' return sn def convert(self, value): """ Convert a string value as received in the command line tools and convert to the appropriate type of value. Raise a ValidationError if the value can't be converted. :type value: str :param value: The value to convert. This should always be a string. """ return Converter.convert(self, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/route53/__init__.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # # this is here for backward compatibility # originally, the Route53Connection class was defined here from connection import Route53Connection ================================================ FILE: deploy/third_party/boto-2.1.1/boto/route53/connection.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # import xml.sax import time import uuid import urllib import boto from boto.connection import AWSAuthConnection from boto import handler from boto.resultset import ResultSet import boto.jsonresponse import exception import hostedzone HZXML = """ %(name)s %(caller_ref)s %(comment)s """ #boto.set_stream_logger('dns') class Route53Connection(AWSAuthConnection): DefaultHost = 'route53.amazonaws.com' """The default Route53 API endpoint to connect to.""" Version = '2011-05-05' """Route53 API version.""" XMLNameSpace = 'https://route53.amazonaws.com/doc/2011-05-05/' """XML schema for this Route53 API version.""" def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, port=None, proxy=None, proxy_port=None, host=DefaultHost, debug=0): AWSAuthConnection.__init__(self, host, aws_access_key_id, aws_secret_access_key, True, port, proxy, proxy_port, debug=debug) def _required_auth_capability(self): return ['route53'] def make_request(self, action, path, headers=None, data='', params=None): if params: pairs = [] for key, val in params.iteritems(): if val is None: continue pairs.append(key + '=' + urllib.quote(str(val))) path += '?' + '&'.join(pairs) return AWSAuthConnection.make_request(self, action, path, headers, data) # Hosted Zones def get_all_hosted_zones(self, start_marker=None, zone_list=None): """ Returns a Python data structure with information about all Hosted Zones defined for the AWS account. :param int start_marker: start marker to pass when fetching additional results after a truncated list :param list zone_list: a HostedZones list to prepend to results """ params = {} if start_marker: params = {'marker': start_marker} response = self.make_request('GET', '/%s/hostedzone' % self.Version, params=params) body = response.read() boto.log.debug(body) if response.status >= 300: raise exception.DNSServerError(response.status, response.reason, body) e = boto.jsonresponse.Element(list_marker='HostedZones', item_marker=('HostedZone',)) h = boto.jsonresponse.XmlHandler(e, None) h.parse(body) if zone_list: e['ListHostedZonesResponse']['HostedZones'].extend(zone_list) while e['ListHostedZonesResponse'].has_key('NextMarker'): next_marker = e['ListHostedZonesResponse']['NextMarker'] zone_list = e['ListHostedZonesResponse']['HostedZones'] e = self.get_all_hosted_zones(next_marker, zone_list) return e def get_hosted_zone(self, hosted_zone_id): """ Get detailed information about a particular Hosted Zone. :type hosted_zone_id: str :param hosted_zone_id: The unique identifier for the Hosted Zone """ uri = '/%s/hostedzone/%s' % (self.Version, hosted_zone_id) response = self.make_request('GET', uri) body = response.read() boto.log.debug(body) if response.status >= 300: raise exception.DNSServerError(response.status, response.reason, body) e = boto.jsonresponse.Element(list_marker='NameServers', item_marker=('NameServer',)) h = boto.jsonresponse.XmlHandler(e, None) h.parse(body) return e def create_hosted_zone(self, domain_name, caller_ref=None, comment=''): """ Create a new Hosted Zone. Returns a Python data structure with information about the newly created Hosted Zone. :type domain_name: str :param domain_name: The name of the domain. This should be a fully-specified domain, and should end with a final period as the last label indication. If you omit the final period, Amazon Route 53 assumes the domain is relative to the root. This is the name you have registered with your DNS registrar. It is also the name you will delegate from your registrar to the Amazon Route 53 delegation servers returned in response to this request.A list of strings with the image IDs wanted. :type caller_ref: str :param caller_ref: A unique string that identifies the request and that allows failed CreateHostedZone requests to be retried without the risk of executing the operation twice. If you don't provide a value for this, boto will generate a Type 4 UUID and use that. :type comment: str :param comment: Any comments you want to include about the hosted zone. """ if caller_ref is None: caller_ref = str(uuid.uuid4()) params = {'name' : domain_name, 'caller_ref' : caller_ref, 'comment' : comment, 'xmlns' : self.XMLNameSpace} xml = HZXML % params uri = '/%s/hostedzone' % self.Version response = self.make_request('POST', uri, {'Content-Type' : 'text/xml'}, xml) body = response.read() boto.log.debug(body) if response.status == 201: e = boto.jsonresponse.Element(list_marker='NameServers', item_marker=('NameServer',)) h = boto.jsonresponse.XmlHandler(e, None) h.parse(body) return e else: raise exception.DNSServerError(response.status, response.reason, body) def delete_hosted_zone(self, hosted_zone_id): uri = '/%s/hostedzone/%s' % (self.Version, hosted_zone_id) response = self.make_request('DELETE', uri) body = response.read() boto.log.debug(body) if response.status not in (200, 204): raise exception.DNSServerError(response.status, response.reason, body) e = boto.jsonresponse.Element() h = boto.jsonresponse.XmlHandler(e, None) h.parse(body) return e # Resource Record Sets def get_all_rrsets(self, hosted_zone_id, type=None, name=None, identifier=None, maxitems=None): """ Retrieve the Resource Record Sets defined for this Hosted Zone. Returns the raw XML data returned by the Route53 call. :type hosted_zone_id: str :param hosted_zone_id: The unique identifier for the Hosted Zone :type type: str :param type: The type of resource record set to begin the record listing from. Valid choices are: * A * AAAA * CNAME * MX * NS * PTR * SOA * SPF * SRV * TXT Valid values for weighted resource record sets: * A * AAAA * CNAME * TXT Valid values for Zone Apex Aliases: * A * AAAA :type name: str :param name: The first name in the lexicographic ordering of domain names to be retrieved :type identifier: str :param identifier: In a hosted zone that includes weighted resource record sets (multiple resource record sets with the same DNS name and type that are differentiated only by SetIdentifier), if results were truncated for a given DNS name and type, the value of SetIdentifier for the next resource record set that has the current DNS name and type :type maxitems: int :param maxitems: The maximum number of records """ from boto.route53.record import ResourceRecordSets params = {'type': type, 'name': name, 'Identifier': identifier, 'maxitems': maxitems} uri = '/%s/hostedzone/%s/rrset' % (self.Version, hosted_zone_id) response = self.make_request('GET', uri, params=params) body = response.read() boto.log.debug(body) if response.status >= 300: raise exception.DNSServerError(response.status, response.reason, body) rs = ResourceRecordSets(connection=self, hosted_zone_id=hosted_zone_id) h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs def change_rrsets(self, hosted_zone_id, xml_body): """ Create or change the authoritative DNS information for this Hosted Zone. Returns a Python data structure with information about the set of changes, including the Change ID. :type hosted_zone_id: str :param hosted_zone_id: The unique identifier for the Hosted Zone :type xml_body: str :param xml_body: The list of changes to be made, defined in the XML schema defined by the Route53 service. """ uri = '/%s/hostedzone/%s/rrset' % (self.Version, hosted_zone_id) response = self.make_request('POST', uri, {'Content-Type' : 'text/xml'}, xml_body) body = response.read() boto.log.debug(body) if response.status >= 300: raise exception.DNSServerError(response.status, response.reason, body) e = boto.jsonresponse.Element() h = boto.jsonresponse.XmlHandler(e, None) h.parse(body) return e def get_change(self, change_id): """ Get information about a proposed set of changes, as submitted by the change_rrsets method. Returns a Python data structure with status information about the changes. :type change_id: str :param change_id: The unique identifier for the set of changes. This ID is returned in the response to the change_rrsets method. """ uri = '/%s/change/%s' % (self.Version, change_id) response = self.make_request('GET', uri) body = response.read() boto.log.debug(body) if response.status >= 300: raise exception.DNSServerError(response.status, response.reason, body) e = boto.jsonresponse.Element() h = boto.jsonresponse.XmlHandler(e, None) h.parse(body) return e ================================================ FILE: deploy/third_party/boto-2.1.1/boto/route53/exception.py ================================================ # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.exception import BotoServerError class DNSServerError(BotoServerError): pass ================================================ FILE: deploy/third_party/boto-2.1.1/boto/route53/hostedzone.py ================================================ # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # class HostedZone(object): def __init__(self, id=None, name=None, owner=None, version=None, caller_reference=None, config=None): self.id = id self.name = name self.owner = owner self.version = version self.caller_reference = caller_reference self.config = config def startElement(self, name, attrs, connection): if name == 'Config': self.config = Config() return self.config else: return None def endElement(self, name, value, connection): if name == 'Id': self.id = value elif name == 'Name': self.name = value elif name == 'Owner': self.owner = value elif name == 'Version': self.version = value elif name == 'CallerReference': self.caller_reference = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/route53/record.py ================================================ # Copyright (c) 2010 Chris Moyer http://coredumped.org/ # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. RECORD_TYPES = ['A', 'AAAA', 'TXT', 'CNAME', 'MX', 'PTR', 'SRV', 'SPF'] from boto.resultset import ResultSet class ResourceRecordSets(ResultSet): ChangeResourceRecordSetsBody = """ %(comment)s %(changes)s """ ChangeXML = """ %(action)s %(record)s """ def __init__(self, connection=None, hosted_zone_id=None, comment=None): self.connection = connection self.hosted_zone_id = hosted_zone_id self.comment = comment self.changes = [] self.next_record_name = None self.next_record_type = None ResultSet.__init__(self, [('ResourceRecordSet', Record)]) def __repr__(self): return '' % self.hosted_zone_id def add_change(self, action, name, type, ttl=600, alias_hosted_zone_id=None, alias_dns_name=None): """Add a change request""" change = Record(name, type, ttl, alias_hosted_zone_id=alias_hosted_zone_id, alias_dns_name=alias_dns_name) self.changes.append([action, change]) return change def to_xml(self): """Convert this ResourceRecordSet into XML to be saved via the ChangeResourceRecordSetsRequest""" changesXML = "" for change in self.changes: changeParams = {"action": change[0], "record": change[1].to_xml()} changesXML += self.ChangeXML % changeParams params = {"comment": self.comment, "changes": changesXML} return self.ChangeResourceRecordSetsBody % params def commit(self): """Commit this change""" if not self.connection: import boto self.connection = boto.connect_route53() return self.connection.change_rrsets(self.hosted_zone_id, self.to_xml()) def endElement(self, name, value, connection): """Overwritten to also add the NextRecordName and NextRecordType to the base object""" if name == 'NextRecordName': self.next_record_name = value elif name == 'NextRecordType': self.next_record_type = value else: return ResultSet.endElement(self, name, value, connection) def __iter__(self): """Override the next function to support paging""" results = ResultSet.__iter__(self) while results: for obj in results: yield obj if self.is_truncated: self.is_truncated = False results = self.connection.get_all_rrsets(self.hosted_zone_id, name=self.next_record_name, type=self.next_record_type) else: results = None class Record(object): """An individual ResourceRecordSet""" XMLBody = """ %(name)s %(type)s %(body)s """ ResourceRecordsBody = """ %(ttl)s %(records)s """ ResourceRecordBody = """ %s """ AliasBody = """ %s %s """ def __init__(self, name=None, type=None, ttl=600, resource_records=None, alias_hosted_zone_id=None, alias_dns_name=None): self.name = name self.type = type self.ttl = ttl if resource_records == None: resource_records = [] self.resource_records = resource_records self.alias_hosted_zone_id = alias_hosted_zone_id self.alias_dns_name = alias_dns_name def add_value(self, value): """Add a resource record value""" self.resource_records.append(value) def set_alias(self, alias_hosted_zone_id, alias_dns_name): """Make this an alias resource record set""" self.alias_hosted_zone_id = alias_hosted_zone_id self.alias_dns_name = alias_dns_name def to_xml(self): """Spit this resource record set out as XML""" if self.alias_hosted_zone_id != None and self.alias_dns_name != None: # Use alias body = self.AliasBody % (self.alias_hosted_zone_id, self.alias_dns_name) else: # Use resource record(s) records = "" for r in self.resource_records: records += self.ResourceRecordBody % r body = self.ResourceRecordsBody % { "ttl": self.ttl, "records": records, } params = { "name": self.name, "type": self.type, "body": body, } return self.XMLBody % params def to_print(self): if self.alias_hosted_zone_id != None and self.alias_dns_name != None: # Show alias return 'ALIAS ' + self.alias_hosted_zone_id + ' ' + self.alias_dns_name else: # Show resource record(s) return ",".join(self.resource_records) def endElement(self, name, value, connection): if name == 'Name': self.name = value elif name == 'Type': self.type = value elif name == 'TTL': self.ttl = value elif name == 'Value': self.resource_records.append(value) elif name == 'HostedZoneId': self.alias_hosted_zone_id = value elif name == 'DNSName': self.alias_dns_name = value def startElement(self, name, attrs, connection): return None ================================================ FILE: deploy/third_party/boto-2.1.1/boto/s3/__init__.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # ================================================ FILE: deploy/third_party/boto-2.1.1/boto/s3/acl.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.s3.user import User CannedACLStrings = ['private', 'public-read', 'public-read-write', 'authenticated-read', 'bucket-owner-read', 'bucket-owner-full-control'] class Policy: def __init__(self, parent=None): self.parent = parent self.acl = None def __repr__(self): grants = [] for g in self.acl.grants: if g.id == self.owner.id: grants.append("%s (owner) = %s" % (g.display_name, g.permission)) else: if g.type == 'CanonicalUser': u = g.display_name elif g.type == 'Group': u = g.uri else: u = g.email_address grants.append("%s = %s" % (u, g.permission)) return "" % ", ".join(grants) def startElement(self, name, attrs, connection): if name == 'Owner': self.owner = User(self) return self.owner elif name == 'AccessControlList': self.acl = ACL(self) return self.acl else: return None def endElement(self, name, value, connection): if name == 'Owner': pass elif name == 'AccessControlList': pass else: setattr(self, name, value) def to_xml(self): s = '' s += self.owner.to_xml() s += self.acl.to_xml() s += '' return s class ACL: def __init__(self, policy=None): self.policy = policy self.grants = [] def add_grant(self, grant): self.grants.append(grant) def add_email_grant(self, permission, email_address): grant = Grant(permission=permission, type='AmazonCustomerByEmail', email_address=email_address) self.grants.append(grant) def add_user_grant(self, permission, user_id, display_name=None): grant = Grant(permission=permission, type='CanonicalUser', id=user_id, display_name=display_name) self.grants.append(grant) def startElement(self, name, attrs, connection): if name == 'Grant': self.grants.append(Grant(self)) return self.grants[-1] else: return None def endElement(self, name, value, connection): if name == 'Grant': pass else: setattr(self, name, value) def to_xml(self): s = '' for grant in self.grants: s += grant.to_xml() s += '' return s class Grant: NameSpace = 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' def __init__(self, permission=None, type=None, id=None, display_name=None, uri=None, email_address=None): self.permission = permission self.id = id self.display_name = display_name self.uri = uri self.email_address = email_address self.type = type def startElement(self, name, attrs, connection): if name == 'Grantee': self.type = attrs['xsi:type'] return None def endElement(self, name, value, connection): if name == 'ID': self.id = value elif name == 'DisplayName': self.display_name = value elif name == 'URI': self.uri = value elif name == 'EmailAddress': self.email_address = value elif name == 'Grantee': pass elif name == 'Permission': self.permission = value else: setattr(self, name, value) def to_xml(self): s = '' s += '' % (self.NameSpace, self.type) if self.type == 'CanonicalUser': s += '%s' % self.id s += '%s' % self.display_name elif self.type == 'Group': s += '%s' % self.uri else: s += '%s' % self.email_address s += '' s += '%s' % self.permission s += '' return s ================================================ FILE: deploy/third_party/boto-2.1.1/boto/s3/bucket.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import boto from boto import handler from boto.resultset import ResultSet from boto.s3.acl import Policy, CannedACLStrings, Grant from boto.s3.key import Key from boto.s3.prefix import Prefix from boto.s3.deletemarker import DeleteMarker from boto.s3.multipart import MultiPartUpload from boto.s3.multipart import CompleteMultiPartUpload from boto.s3.bucketlistresultset import BucketListResultSet from boto.s3.bucketlistresultset import VersionedBucketListResultSet from boto.s3.bucketlistresultset import MultiPartUploadListResultSet import boto.jsonresponse import boto.utils import xml.sax import urllib import re from collections import defaultdict # as per http://goo.gl/BDuud (02/19/2011) class S3WebsiteEndpointTranslate: trans_region = defaultdict(lambda :'s3-website-us-east-1') trans_region['EU'] = 's3-website-eu-west-1' trans_region['us-west-1'] = 's3-website-us-west-1' trans_region['ap-northeast-1'] = 's3-website-ap-northeast-1' trans_region['ap-southeast-1'] = 's3-website-ap-southeast-1' @classmethod def translate_region(self, reg): return self.trans_region[reg] S3Permissions = ['READ', 'WRITE', 'READ_ACP', 'WRITE_ACP', 'FULL_CONTROL'] class Bucket(object): BucketLoggingBody = """ %s %s """ EmptyBucketLoggingBody = """ """ LoggingGroup = 'http://acs.amazonaws.com/groups/s3/LogDelivery' BucketPaymentBody = """ %s """ VersioningBody = """ %s %s """ WebsiteBody = """ %s %s """ WebsiteErrorFragment = """%s""" VersionRE = '([A-Za-z]+)' MFADeleteRE = '([A-Za-z]+)' def __init__(self, connection=None, name=None, key_class=Key): self.name = name self.connection = connection self.key_class = key_class def __repr__(self): return '' % self.name def __iter__(self): return iter(BucketListResultSet(self)) def __contains__(self, key_name): return not (self.get_key(key_name) is None) def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'Name': self.name = value elif name == 'CreationDate': self.creation_date = value else: setattr(self, name, value) def set_key_class(self, key_class): """ Set the Key class associated with this bucket. By default, this would be the boto.s3.key.Key class but if you want to subclass that for some reason this allows you to associate your new class with a bucket so that when you call bucket.new_key() or when you get a listing of keys in the bucket you will get an instances of your key class rather than the default. :type key_class: class :param key_class: A subclass of Key that can be more specific """ self.key_class = key_class def lookup(self, key_name, headers=None): """ Deprecated: Please use get_key method. :type key_name: string :param key_name: The name of the key to retrieve :rtype: :class:`boto.s3.key.Key` :returns: A Key object from this bucket. """ return self.get_key(key_name, headers=headers) def get_key(self, key_name, headers=None, version_id=None): """ Check to see if a particular key exists within the bucket. This method uses a HEAD request to check for the existance of the key. Returns: An instance of a Key object or None :type key_name: string :param key_name: The name of the key to retrieve :rtype: :class:`boto.s3.key.Key` :returns: A Key object from this bucket. """ if version_id: query_args = 'versionId=%s' % version_id else: query_args = None response = self.connection.make_request('HEAD', self.name, key_name, headers=headers, query_args=query_args) # Allow any success status (2xx) - for example this lets us # support Range gets, which return status 206: if response.status/100 == 2: response.read() k = self.key_class(self) provider = self.connection.provider k.metadata = boto.utils.get_aws_metadata(response.msg, provider) k.etag = response.getheader('etag') k.content_type = response.getheader('content-type') k.content_encoding = response.getheader('content-encoding') k.last_modified = response.getheader('last-modified') # the following machinations are a workaround to the fact that # apache/fastcgi omits the content-length header on HEAD # requests when the content-length is zero. # See http://goo.gl/0Tdax for more details. clen = response.getheader('content-length') if clen: k.size = int(response.getheader('content-length')) else: k.size = 0 k.cache_control = response.getheader('cache-control') k.name = key_name k.handle_version_headers(response) k.handle_encryption_headers(response) return k else: if response.status == 404: response.read() return None else: raise self.connection.provider.storage_response_error( response.status, response.reason, '') def list(self, prefix='', delimiter='', marker='', headers=None): """ List key objects within a bucket. This returns an instance of an BucketListResultSet that automatically handles all of the result paging, etc. from S3. You just need to keep iterating until there are no more results. Called with no arguments, this will return an iterator object across all keys within the bucket. The Key objects returned by the iterator are obtained by parsing the results of a GET on the bucket, also known as the List Objects request. The XML returned by this request contains only a subset of the information about each key. Certain metadata fields such as Content-Type and user metadata are not available in the XML. Therefore, if you want these additional metadata fields you will have to do a HEAD request on the Key in the bucket. :type prefix: string :param prefix: allows you to limit the listing to a particular prefix. For example, if you call the method with prefix='/foo/' then the iterator will only cycle through the keys that begin with the string '/foo/'. :type delimiter: string :param delimiter: can be used in conjunction with the prefix to allow you to organize and browse your keys hierarchically. See: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/ for more details. :type marker: string :param marker: The "marker" of where you are in the result set :rtype: :class:`boto.s3.bucketlistresultset.BucketListResultSet` :return: an instance of a BucketListResultSet that handles paging, etc """ return BucketListResultSet(self, prefix, delimiter, marker, headers) def list_versions(self, prefix='', delimiter='', key_marker='', version_id_marker='', headers=None): """ List version objects within a bucket. This returns an instance of an VersionedBucketListResultSet that automatically handles all of the result paging, etc. from S3. You just need to keep iterating until there are no more results. Called with no arguments, this will return an iterator object across all keys within the bucket. :type prefix: string :param prefix: allows you to limit the listing to a particular prefix. For example, if you call the method with prefix='/foo/' then the iterator will only cycle through the keys that begin with the string '/foo/'. :type delimiter: string :param delimiter: can be used in conjunction with the prefix to allow you to organize and browse your keys hierarchically. See: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/ for more details. :type marker: string :param marker: The "marker" of where you are in the result set :rtype: :class:`boto.s3.bucketlistresultset.BucketListResultSet` :return: an instance of a BucketListResultSet that handles paging, etc """ return VersionedBucketListResultSet(self, prefix, delimiter, key_marker, version_id_marker, headers) def list_multipart_uploads(self, key_marker='', upload_id_marker='', headers=None): """ List multipart upload objects within a bucket. This returns an instance of an MultiPartUploadListResultSet that automatically handles all of the result paging, etc. from S3. You just need to keep iterating until there are no more results. :type marker: string :param marker: The "marker" of where you are in the result set :rtype: :class:`boto.s3.bucketlistresultset.BucketListResultSet` :return: an instance of a BucketListResultSet that handles paging, etc """ return MultiPartUploadListResultSet(self, key_marker, upload_id_marker, headers) def _get_all(self, element_map, initial_query_string='', headers=None, **params): l = [] for k, v in params.items(): k = k.replace('_', '-') if k == 'maxkeys': k = 'max-keys' if isinstance(v, unicode): v = v.encode('utf-8') if v is not None and v != '': l.append('%s=%s' % (urllib.quote(k), urllib.quote(str(v)))) if len(l): s = initial_query_string + '&' + '&'.join(l) else: s = initial_query_string response = self.connection.make_request('GET', self.name, headers=headers, query_args=s) body = response.read() boto.log.debug(body) if response.status == 200: rs = ResultSet(element_map) h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def get_all_keys(self, headers=None, **params): """ A lower-level method for listing contents of a bucket. This closely models the actual S3 API and requires you to manually handle the paging of results. For a higher-level method that handles the details of paging for you, you can use the list method. :type max_keys: int :param max_keys: The maximum number of keys to retrieve :type prefix: string :param prefix: The prefix of the keys you want to retrieve :type marker: string :param marker: The "marker" of where you are in the result set :type delimiter: string :param delimiter: If this optional, Unicode string parameter is included with your request, then keys that contain the same string between the prefix and the first occurrence of the delimiter will be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response. :rtype: ResultSet :return: The result from S3 listing the keys requested """ return self._get_all([('Contents', self.key_class), ('CommonPrefixes', Prefix)], '', headers, **params) def get_all_versions(self, headers=None, **params): """ A lower-level, version-aware method for listing contents of a bucket. This closely models the actual S3 API and requires you to manually handle the paging of results. For a higher-level method that handles the details of paging for you, you can use the list method. :type max_keys: int :param max_keys: The maximum number of keys to retrieve :type prefix: string :param prefix: The prefix of the keys you want to retrieve :type key_marker: string :param key_marker: The "marker" of where you are in the result set with respect to keys. :type version_id_marker: string :param version_id_marker: The "marker" of where you are in the result set with respect to version-id's. :type delimiter: string :param delimiter: If this optional, Unicode string parameter is included with your request, then keys that contain the same string between the prefix and the first occurrence of the delimiter will be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response. :rtype: ResultSet :return: The result from S3 listing the keys requested """ return self._get_all([('Version', self.key_class), ('CommonPrefixes', Prefix), ('DeleteMarker', DeleteMarker)], 'versions', headers, **params) def get_all_multipart_uploads(self, headers=None, **params): """ A lower-level, version-aware method for listing active MultiPart uploads for a bucket. This closely models the actual S3 API and requires you to manually handle the paging of results. For a higher-level method that handles the details of paging for you, you can use the list method. :type max_uploads: int :param max_uploads: The maximum number of uploads to retrieve. Default value is 1000. :type key_marker: string :param key_marker: Together with upload_id_marker, this parameter specifies the multipart upload after which listing should begin. If upload_id_marker is not specified, only the keys lexicographically greater than the specified key_marker will be included in the list. If upload_id_marker is specified, any multipart uploads for a key equal to the key_marker might also be included, provided those multipart uploads have upload IDs lexicographically greater than the specified upload_id_marker. :type upload_id_marker: string :param upload_id_marker: Together with key-marker, specifies the multipart upload after which listing should begin. If key_marker is not specified, the upload_id_marker parameter is ignored. Otherwise, any multipart uploads for a key equal to the key_marker might be included in the list only if they have an upload ID lexicographically greater than the specified upload_id_marker. :rtype: ResultSet :return: The result from S3 listing the uploads requested """ return self._get_all([('Upload', MultiPartUpload)], 'uploads', headers, **params) def new_key(self, key_name=None): """ Creates a new key :type key_name: string :param key_name: The name of the key to create :rtype: :class:`boto.s3.key.Key` or subclass :returns: An instance of the newly created key object """ return self.key_class(self, key_name) def generate_url(self, expires_in, method='GET', headers=None, force_http=False, response_headers=None): return self.connection.generate_url(expires_in, method, self.name, headers=headers, force_http=force_http, response_headers=response_headers) def delete_key(self, key_name, headers=None, version_id=None, mfa_token=None): """ Deletes a key from the bucket. If a version_id is provided, only that version of the key will be deleted. :type key_name: string :param key_name: The key name to delete :type version_id: string :param version_id: The version ID (optional) :type mfa_token: tuple or list of strings :param mfa_token: A tuple or list consisting of the serial number from the MFA device and the current value of the six-digit token associated with the device. This value is required anytime you are deleting versioned objects from a bucket that has the MFADelete option on the bucket. """ provider = self.connection.provider if version_id: query_args = 'versionId=%s' % version_id else: query_args = None if mfa_token: if not headers: headers = {} headers[provider.mfa_header] = ' '.join(mfa_token) response = self.connection.make_request('DELETE', self.name, key_name, headers=headers, query_args=query_args) body = response.read() if response.status != 204: raise provider.storage_response_error(response.status, response.reason, body) def copy_key(self, new_key_name, src_bucket_name, src_key_name, metadata=None, src_version_id=None, storage_class='STANDARD', preserve_acl=False, encrypt_key=False): """ Create a new key in the bucket by copying another existing key. :type new_key_name: string :param new_key_name: The name of the new key :type src_bucket_name: string :param src_bucket_name: The name of the source bucket :type src_key_name: string :param src_key_name: The name of the source key :type src_version_id: string :param src_version_id: The version id for the key. This param is optional. If not specified, the newest version of the key will be copied. :type metadata: dict :param metadata: Metadata to be associated with new key. If metadata is supplied, it will replace the metadata of the source key being copied. If no metadata is supplied, the source key's metadata will be copied to the new key. :type storage_class: string :param storage_class: The storage class of the new key. By default, the new key will use the standard storage class. Possible values are: STANDARD | REDUCED_REDUNDANCY :type preserve_acl: bool :param preserve_acl: If True, the ACL from the source key will be copied to the destination key. If False, the destination key will have the default ACL. Note that preserving the ACL in the new key object will require two additional API calls to S3, one to retrieve the current ACL and one to set that ACL on the new object. If you don't care about the ACL, a value of False will be significantly more efficient. :type encrypt_key: bool :param encrypt_key: If True, the new copy of the object will be encrypted on the server-side by S3 and will be stored in an encrypted form while at rest in S3. :rtype: :class:`boto.s3.key.Key` or subclass :returns: An instance of the newly created key object """ headers = {} provider = self.connection.provider src_key_name = boto.utils.get_utf8_value(src_key_name) if preserve_acl: if self.name == src_bucket_name: src_bucket = self else: src_bucket = self.connection.get_bucket(src_bucket_name) acl = src_bucket.get_xml_acl(src_key_name) if encrypt_key: headers[provider.server_side_encryption_header] = 'AES256' src = '%s/%s' % (src_bucket_name, urllib.quote(src_key_name)) if src_version_id: src += '?version_id=%s' % src_version_id headers = {provider.copy_source_header : str(src)} headers[provider.storage_class_header] = storage_class if metadata: headers[provider.metadata_directive_header] = 'REPLACE' headers = boto.utils.merge_meta(headers, metadata, provider) else: headers[provider.metadata_directive_header] = 'COPY' response = self.connection.make_request('PUT', self.name, new_key_name, headers=headers) body = response.read() if response.status == 200: key = self.new_key(new_key_name) h = handler.XmlHandler(key, self) xml.sax.parseString(body, h) if hasattr(key, 'Error'): raise provider.storage_copy_error(key.Code, key.Message, body) key.handle_version_headers(response) if preserve_acl: self.set_xml_acl(acl, new_key_name) return key else: raise provider.storage_response_error(response.status, response.reason, body) def set_canned_acl(self, acl_str, key_name='', headers=None, version_id=None): assert acl_str in CannedACLStrings if headers: headers[self.connection.provider.acl_header] = acl_str else: headers={self.connection.provider.acl_header: acl_str} query_args = 'acl' if version_id: query_args += '&versionId=%s' % version_id response = self.connection.make_request('PUT', self.name, key_name, headers=headers, query_args=query_args) body = response.read() if response.status != 200: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def get_xml_acl(self, key_name='', headers=None, version_id=None): query_args = 'acl' if version_id: query_args += '&versionId=%s' % version_id response = self.connection.make_request('GET', self.name, key_name, query_args=query_args, headers=headers) body = response.read() if response.status != 200: raise self.connection.provider.storage_response_error( response.status, response.reason, body) return body def set_xml_acl(self, acl_str, key_name='', headers=None, version_id=None): query_args = 'acl' if version_id: query_args += '&versionId=%s' % version_id response = self.connection.make_request('PUT', self.name, key_name, data=acl_str.encode('ISO-8859-1'), query_args=query_args, headers=headers) body = response.read() if response.status != 200: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def set_acl(self, acl_or_str, key_name='', headers=None, version_id=None): if isinstance(acl_or_str, Policy): self.set_xml_acl(acl_or_str.to_xml(), key_name, headers, version_id) else: self.set_canned_acl(acl_or_str, key_name, headers, version_id) def get_acl(self, key_name='', headers=None, version_id=None): query_args = 'acl' if version_id: query_args += '&versionId=%s' % version_id response = self.connection.make_request('GET', self.name, key_name, query_args=query_args, headers=headers) body = response.read() if response.status == 200: policy = Policy(self) h = handler.XmlHandler(policy, self) xml.sax.parseString(body, h) return policy else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def set_subresource(self, subresource, value, key_name = '', headers=None, version_id=None): """ Set a subresource for a bucket or key. :type subresource: string :param subresource: The subresource to set. :type value: string :param value: The value of the subresource. :type key_name: string :param key_name: The key to operate on, or None to operate on the bucket. :type headers: dict :param headers: Additional HTTP headers to include in the request. :type src_version_id: string :param src_version_id: Optional. The version id of the key to operate on. If not specified, operate on the newest version. """ if not subresource: raise TypeError('set_subresource called with subresource=None') query_args = subresource if version_id: query_args += '&versionId=%s' % version_id response = self.connection.make_request('PUT', self.name, key_name, data=value.encode('UTF-8'), query_args=query_args, headers=headers) body = response.read() if response.status != 200: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def get_subresource(self, subresource, key_name='', headers=None, version_id=None): """ Get a subresource for a bucket or key. :type subresource: string :param subresource: The subresource to get. :type key_name: string :param key_name: The key to operate on, or None to operate on the bucket. :type headers: dict :param headers: Additional HTTP headers to include in the request. :type src_version_id: string :param src_version_id: Optional. The version id of the key to operate on. If not specified, operate on the newest version. :rtype: string :returns: The value of the subresource. """ if not subresource: raise TypeError('get_subresource called with subresource=None') query_args = subresource if version_id: query_args += '&versionId=%s' % version_id response = self.connection.make_request('GET', self.name, key_name, query_args=query_args, headers=headers) body = response.read() if response.status != 200: raise self.connection.provider.storage_response_error( response.status, response.reason, body) return body def make_public(self, recursive=False, headers=None): self.set_canned_acl('public-read', headers=headers) if recursive: for key in self: self.set_canned_acl('public-read', key.name, headers=headers) def add_email_grant(self, permission, email_address, recursive=False, headers=None): """ Convenience method that provides a quick way to add an email grant to a bucket. This method retrieves the current ACL, creates a new grant based on the parameters passed in, adds that grant to the ACL and then PUT's the new ACL back to S3. :type permission: string :param permission: The permission being granted. Should be one of: (READ, WRITE, READ_ACP, WRITE_ACP, FULL_CONTROL). :type email_address: string :param email_address: The email address associated with the AWS account your are granting the permission to. :type recursive: boolean :param recursive: A boolean value to controls whether the command will apply the grant to all keys within the bucket or not. The default value is False. By passing a True value, the call will iterate through all keys in the bucket and apply the same grant to each key. CAUTION: If you have a lot of keys, this could take a long time! """ if permission not in S3Permissions: raise self.connection.provider.storage_permissions_error( 'Unknown Permission: %s' % permission) policy = self.get_acl(headers=headers) policy.acl.add_email_grant(permission, email_address) self.set_acl(policy, headers=headers) if recursive: for key in self: key.add_email_grant(permission, email_address, headers=headers) def add_user_grant(self, permission, user_id, recursive=False, headers=None, display_name=None): """ Convenience method that provides a quick way to add a canonical user grant to a bucket. This method retrieves the current ACL, creates a new grant based on the parameters passed in, adds that grant to the ACL and then PUT's the new ACL back to S3. :type permission: string :param permission: The permission being granted. Should be one of: (READ, WRITE, READ_ACP, WRITE_ACP, FULL_CONTROL). :type user_id: string :param user_id: The canonical user id associated with the AWS account your are granting the permission to. :type recursive: boolean :param recursive: A boolean value to controls whether the command will apply the grant to all keys within the bucket or not. The default value is False. By passing a True value, the call will iterate through all keys in the bucket and apply the same grant to each key. CAUTION: If you have a lot of keys, this could take a long time! :type display_name: string :param display_name: An option string containing the user's Display Name. Only required on Walrus. """ if permission not in S3Permissions: raise self.connection.provider.storage_permissions_error( 'Unknown Permission: %s' % permission) policy = self.get_acl(headers=headers) policy.acl.add_user_grant(permission, user_id, display_name=display_name) self.set_acl(policy, headers=headers) if recursive: for key in self: key.add_user_grant(permission, user_id, headers=headers, display_name=display_name) def list_grants(self, headers=None): policy = self.get_acl(headers=headers) return policy.acl.grants def get_location(self): """ Returns the LocationConstraint for the bucket. :rtype: str :return: The LocationConstraint for the bucket or the empty string if no constraint was specified when bucket was created. """ response = self.connection.make_request('GET', self.name, query_args='location') body = response.read() if response.status == 200: rs = ResultSet(self) h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs.LocationConstraint else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def enable_logging(self, target_bucket, target_prefix='', headers=None): if isinstance(target_bucket, Bucket): target_bucket = target_bucket.name body = self.BucketLoggingBody % (target_bucket, target_prefix) response = self.connection.make_request('PUT', self.name, data=body, query_args='logging', headers=headers) body = response.read() if response.status == 200: return True else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def disable_logging(self, headers=None): body = self.EmptyBucketLoggingBody response = self.connection.make_request('PUT', self.name, data=body, query_args='logging', headers=headers) body = response.read() if response.status == 200: return True else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def get_logging_status(self, headers=None): response = self.connection.make_request('GET', self.name, query_args='logging', headers=headers) body = response.read() if response.status == 200: return body else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def set_as_logging_target(self, headers=None): policy = self.get_acl(headers=headers) g1 = Grant(permission='WRITE', type='Group', uri=self.LoggingGroup) g2 = Grant(permission='READ_ACP', type='Group', uri=self.LoggingGroup) policy.acl.add_grant(g1) policy.acl.add_grant(g2) self.set_acl(policy, headers=headers) def get_request_payment(self, headers=None): response = self.connection.make_request('GET', self.name, query_args='requestPayment', headers=headers) body = response.read() if response.status == 200: return body else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def set_request_payment(self, payer='BucketOwner', headers=None): body = self.BucketPaymentBody % payer response = self.connection.make_request('PUT', self.name, data=body, query_args='requestPayment', headers=headers) body = response.read() if response.status == 200: return True else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def configure_versioning(self, versioning, mfa_delete=False, mfa_token=None, headers=None): """ Configure versioning for this bucket. ..note:: This feature is currently in beta. :type versioning: bool :param versioning: A boolean indicating whether version is enabled (True) or disabled (False). :type mfa_delete: bool :param mfa_delete: A boolean indicating whether the Multi-Factor Authentication Delete feature is enabled (True) or disabled (False). If mfa_delete is enabled then all Delete operations will require the token from your MFA device to be passed in the request. :type mfa_token: tuple or list of strings :param mfa_token: A tuple or list consisting of the serial number from the MFA device and the current value of the six-digit token associated with the device. This value is required when you are changing the status of the MfaDelete property of the bucket. """ if versioning: ver = 'Enabled' else: ver = 'Suspended' if mfa_delete: mfa = 'Enabled' else: mfa = 'Disabled' body = self.VersioningBody % (ver, mfa) if mfa_token: if not headers: headers = {} provider = self.connection.provider headers[provider.mfa_header] = ' '.join(mfa_token) response = self.connection.make_request('PUT', self.name, data=body, query_args='versioning', headers=headers) body = response.read() if response.status == 200: return True else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def get_versioning_status(self, headers=None): """ Returns the current status of versioning on the bucket. :rtype: dict :returns: A dictionary containing a key named 'Versioning' that can have a value of either Enabled, Disabled, or Suspended. Also, if MFADelete has ever been enabled on the bucket, the dictionary will contain a key named 'MFADelete' which will have a value of either Enabled or Suspended. """ response = self.connection.make_request('GET', self.name, query_args='versioning', headers=headers) body = response.read() boto.log.debug(body) if response.status == 200: d = {} ver = re.search(self.VersionRE, body) if ver: d['Versioning'] = ver.group(1) mfa = re.search(self.MFADeleteRE, body) if mfa: d['MfaDelete'] = mfa.group(1) return d else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def configure_website(self, suffix, error_key='', headers=None): """ Configure this bucket to act as a website :type suffix: str :param suffix: Suffix that is appended to a request that is for a "directory" on the website endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/ the data that is returned will be for the object with the key name images/index.html). The suffix must not be empty and must not include a slash character. :type error_key: str :param error_key: The object key name to use when a 4XX class error occurs. This is optional. """ if error_key: error_frag = self.WebsiteErrorFragment % error_key else: error_frag = '' body = self.WebsiteBody % (suffix, error_frag) response = self.connection.make_request('PUT', self.name, data=body, query_args='website', headers=headers) body = response.read() if response.status == 200: return True else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def get_website_configuration(self, headers=None): """ Returns the current status of website configuration on the bucket. :rtype: dict :returns: A dictionary containing a Python representation of the XML response from S3. The overall structure is: * WebsiteConfiguration * IndexDocument * Suffix : suffix that is appended to request that is for a "directory" on the website endpoint * ErrorDocument * Key : name of object to serve when an error occurs """ response = self.connection.make_request('GET', self.name, query_args='website', headers=headers) body = response.read() boto.log.debug(body) if response.status == 200: e = boto.jsonresponse.Element() h = boto.jsonresponse.XmlHandler(e, None) h.parse(body) return e else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def delete_website_configuration(self, headers=None): """ Removes all website configuration from the bucket. """ response = self.connection.make_request('DELETE', self.name, query_args='website', headers=headers) body = response.read() boto.log.debug(body) if response.status == 204: return True else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def get_website_endpoint(self): """ Returns the fully qualified hostname to use is you want to access this bucket as a website. This doesn't validate whether the bucket has been correctly configured as a website or not. """ l = [self.name] l.append(S3WebsiteEndpointTranslate.translate_region(self.get_location())) l.append('.'.join(self.connection.host.split('.')[-2:])) return '.'.join(l) def get_policy(self, headers=None): response = self.connection.make_request('GET', self.name, query_args='policy', headers=headers) body = response.read() if response.status == 200: return body else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def set_policy(self, policy, headers=None): response = self.connection.make_request('PUT', self.name, data=policy, query_args='policy', headers=headers) body = response.read() if response.status >= 200 and response.status <= 204: return True else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def delete_policy(self, headers=None): response = self.connection.make_request('DELETE', self.name, data='/?policy', query_args='policy', headers=headers) body = response.read() if response.status >= 200 and response.status <= 204: return True else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def initiate_multipart_upload(self, key_name, headers=None, reduced_redundancy=False, metadata=None, encrypt_key=False): """ Start a multipart upload operation. :type key_name: string :param key_name: The name of the key that will ultimately result from this multipart upload operation. This will be exactly as the key appears in the bucket after the upload process has been completed. :type headers: dict :param headers: Additional HTTP headers to send and store with the resulting key in S3. :type reduced_redundancy: boolean :param reduced_redundancy: In multipart uploads, the storage class is specified when initiating the upload, not when uploading individual parts. So if you want the resulting key to use the reduced redundancy storage class set this flag when you initiate the upload. :type metadata: dict :param metadata: Any metadata that you would like to set on the key that results from the multipart upload. :type encrypt_key: bool :param encrypt_key: If True, the new copy of the object will be encrypted on the server-side by S3 and will be stored in an encrypted form while at rest in S3. """ query_args = 'uploads' provider = self.connection.provider if headers is None: headers = {} if reduced_redundancy: storage_class_header = provider.storage_class_header if storage_class_header: headers[storage_class_header] = 'REDUCED_REDUNDANCY' # TODO: what if the provider doesn't support reduced redundancy? # (see boto.s3.key.Key.set_contents_from_file) if encrypt_key: headers[provider.server_side_encryption_header] = 'AES256' if metadata is None: metadata = {} headers = boto.utils.merge_meta(headers, metadata, self.connection.provider) response = self.connection.make_request('POST', self.name, key_name, query_args=query_args, headers=headers) body = response.read() boto.log.debug(body) if response.status == 200: resp = MultiPartUpload(self) h = handler.XmlHandler(resp, self) xml.sax.parseString(body, h) return resp else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def complete_multipart_upload(self, key_name, upload_id, xml_body, headers=None): """ Complete a multipart upload operation. """ query_args = 'uploadId=%s' % upload_id if headers is None: headers = {} headers['Content-Type'] = 'text/xml' response = self.connection.make_request('POST', self.name, key_name, query_args=query_args, headers=headers, data=xml_body) contains_error = False body = response.read() # Some errors will be reported in the body of the response # even though the HTTP response code is 200. This check # does a quick and dirty peek in the body for an error element. if body.find('') > 0: contains_error = True boto.log.debug(body) if response.status == 200 and not contains_error: resp = CompleteMultiPartUpload(self) h = handler.XmlHandler(resp, self) xml.sax.parseString(body, h) return resp else: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def cancel_multipart_upload(self, key_name, upload_id, headers=None): query_args = 'uploadId=%s' % upload_id response = self.connection.make_request('DELETE', self.name, key_name, query_args=query_args, headers=headers) body = response.read() boto.log.debug(body) if response.status != 204: raise self.connection.provider.storage_response_error( response.status, response.reason, body) def delete(self, headers=None): return self.connection.delete_bucket(self.name, headers=headers) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/s3/bucketlistresultset.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. def bucket_lister(bucket, prefix='', delimiter='', marker='', headers=None): """ A generator function for listing keys in a bucket. """ more_results = True k = None while more_results: rs = bucket.get_all_keys(prefix=prefix, marker=marker, delimiter=delimiter, headers=headers) for k in rs: yield k if k: marker = k.name more_results= rs.is_truncated class BucketListResultSet: """ A resultset for listing keys within a bucket. Uses the bucket_lister generator function and implements the iterator interface. This transparently handles the results paging from S3 so even if you have many thousands of keys within the bucket you can iterate over all keys in a reasonably efficient manner. """ def __init__(self, bucket=None, prefix='', delimiter='', marker='', headers=None): self.bucket = bucket self.prefix = prefix self.delimiter = delimiter self.marker = marker self.headers = headers def __iter__(self): return bucket_lister(self.bucket, prefix=self.prefix, delimiter=self.delimiter, marker=self.marker, headers=self.headers) def versioned_bucket_lister(bucket, prefix='', delimiter='', key_marker='', version_id_marker='', headers=None): """ A generator function for listing versions in a bucket. """ more_results = True k = None while more_results: rs = bucket.get_all_versions(prefix=prefix, key_marker=key_marker, version_id_marker=version_id_marker, delimiter=delimiter, headers=headers, max_keys=999) for k in rs: yield k key_marker = rs.next_key_marker version_id_marker = rs.next_version_id_marker more_results= rs.is_truncated class VersionedBucketListResultSet: """ A resultset for listing versions within a bucket. Uses the bucket_lister generator function and implements the iterator interface. This transparently handles the results paging from S3 so even if you have many thousands of keys within the bucket you can iterate over all keys in a reasonably efficient manner. """ def __init__(self, bucket=None, prefix='', delimiter='', key_marker='', version_id_marker='', headers=None): self.bucket = bucket self.prefix = prefix self.delimiter = delimiter self.key_marker = key_marker self.version_id_marker = version_id_marker self.headers = headers def __iter__(self): return versioned_bucket_lister(self.bucket, prefix=self.prefix, delimiter=self.delimiter, key_marker=self.key_marker, version_id_marker=self.version_id_marker, headers=self.headers) def multipart_upload_lister(bucket, key_marker='', upload_id_marker='', headers=None): """ A generator function for listing multipart uploads in a bucket. """ more_results = True k = None while more_results: rs = bucket.get_all_multipart_uploads(key_marker=key_marker, upload_id_marker=upload_id_marker, headers=headers) for k in rs: yield k key_marker = rs.next_key_marker upload_id_marker = rs.next_upload_id_marker more_results= rs.is_truncated class MultiPartUploadListResultSet: """ A resultset for listing multipart uploads within a bucket. Uses the multipart_upload_lister generator function and implements the iterator interface. This transparently handles the results paging from S3 so even if you have many thousands of uploads within the bucket you can iterate over all keys in a reasonably efficient manner. """ def __init__(self, bucket=None, key_marker='', upload_id_marker='', headers=None): self.bucket = bucket self.key_marker = key_marker self.upload_id_marker = upload_id_marker self.headers = headers def __iter__(self): return multipart_upload_lister(self.bucket, key_marker=self.key_marker, upload_id_marker=self.upload_id_marker, headers=self.headers) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/s3/connection.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import xml.sax import urllib, base64 import time import boto.utils from boto.connection import AWSAuthConnection from boto import handler from boto.s3.bucket import Bucket from boto.s3.key import Key from boto.resultset import ResultSet from boto.exception import BotoClientError def check_lowercase_bucketname(n): """ Bucket names must not contain uppercase characters. We check for this by appending a lowercase character and testing with islower(). Note this also covers cases like numeric bucket names with dashes. >>> check_lowercase_bucketname("Aaaa") Traceback (most recent call last): ... BotoClientError: S3Error: Bucket names cannot contain upper-case characters when using either the sub-domain or virtual hosting calling format. >>> check_lowercase_bucketname("1234-5678-9123") True >>> check_lowercase_bucketname("abcdefg1234") True """ if not (n + 'a').islower(): raise BotoClientError("Bucket names cannot contain upper-case " \ "characters when using either the sub-domain or virtual " \ "hosting calling format.") return True def assert_case_insensitive(f): def wrapper(*args, **kwargs): if len(args) == 3 and check_lowercase_bucketname(args[2]): pass return f(*args, **kwargs) return wrapper class _CallingFormat(object): def get_bucket_server(self, server, bucket): return '' def build_url_base(self, connection, protocol, server, bucket, key=''): url_base = '%s://' % protocol url_base += self.build_host(server, bucket) url_base += connection.get_path(self.build_path_base(bucket, key)) return url_base def build_host(self, server, bucket): if bucket == '': return server else: return self.get_bucket_server(server, bucket) def build_auth_path(self, bucket, key=''): key = boto.utils.get_utf8_value(key) path = '' if bucket != '': path = '/' + bucket return path + '/%s' % urllib.quote(key) def build_path_base(self, bucket, key=''): key = boto.utils.get_utf8_value(key) return '/%s' % urllib.quote(key) class SubdomainCallingFormat(_CallingFormat): @assert_case_insensitive def get_bucket_server(self, server, bucket): return '%s.%s' % (bucket, server) class VHostCallingFormat(_CallingFormat): @assert_case_insensitive def get_bucket_server(self, server, bucket): return bucket class OrdinaryCallingFormat(_CallingFormat): def get_bucket_server(self, server, bucket): return server def build_path_base(self, bucket, key=''): key = boto.utils.get_utf8_value(key) path_base = '/' if bucket: path_base += "%s/" % bucket return path_base + urllib.quote(key) class ProtocolIndependentOrdinaryCallingFormat(OrdinaryCallingFormat): def build_url_base(self, connection, protocol, server, bucket, key=''): url_base = '//' url_base += self.build_host(server, bucket) url_base += connection.get_path(self.build_path_base(bucket, key)) return url_base class Location: DEFAULT = '' # US Classic Region EU = 'EU' USWest = 'us-west-1' APNortheast = 'ap-northeast-1' APSoutheast = 'ap-southeast-1' class S3Connection(AWSAuthConnection): DefaultHost = 's3.amazonaws.com' QueryString = 'Signature=%s&Expires=%d&AWSAccessKeyId=%s' def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, host=DefaultHost, debug=0, https_connection_factory=None, calling_format=SubdomainCallingFormat(), path='/', provider='aws', bucket_class=Bucket, security_token=None): self.calling_format = calling_format self.bucket_class = bucket_class AWSAuthConnection.__init__(self, host, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, debug=debug, https_connection_factory=https_connection_factory, path=path, provider=provider, security_token=security_token) def _required_auth_capability(self): return ['s3'] def __iter__(self): for bucket in self.get_all_buckets(): yield bucket def __contains__(self, bucket_name): return not (self.lookup(bucket_name) is None) def set_bucket_class(self, bucket_class): """ Set the Bucket class associated with this bucket. By default, this would be the boto.s3.key.Bucket class but if you want to subclass that for some reason this allows you to associate your new class. :type bucket_class: class :param bucket_class: A subclass of Bucket that can be more specific """ self.bucket_class = bucket_class def build_post_policy(self, expiration_time, conditions): """ Taken from the AWS book Python examples and modified for use with boto """ assert type(expiration_time) == time.struct_time, \ 'Policy document must include a valid expiration Time object' # Convert conditions object mappings to condition statements return '{"expiration": "%s",\n"conditions": [%s]}' % \ (time.strftime(boto.utils.ISO8601, expiration_time), ",".join(conditions)) def build_post_form_args(self, bucket_name, key, expires_in = 6000, acl = None, success_action_redirect = None, max_content_length = None, http_method = "http", fields=None, conditions=None): """ Taken from the AWS book Python examples and modified for use with boto This only returns the arguments required for the post form, not the actual form This does not return the file input field which also needs to be added :param bucket_name: Bucket to submit to :type bucket_name: string :param key: Key name, optionally add ${filename} to the end to attach the submitted filename :type key: string :param expires_in: Time (in seconds) before this expires, defaults to 6000 :type expires_in: integer :param acl: ACL rule to use, if any :type acl: :class:`boto.s3.acl.ACL` :param success_action_redirect: URL to redirect to on success :type success_action_redirect: string :param max_content_length: Maximum size for this file :type max_content_length: integer :type http_method: string :param http_method: HTTP Method to use, "http" or "https" :rtype: dict :return: A dictionary containing field names/values as well as a url to POST to .. code-block:: python { "action": action_url_to_post_to, "fields": [ { "name": field_name, "value": field_value }, { "name": field_name2, "value": field_value2 } ] } """ if fields == None: fields = [] if conditions == None: conditions = [] expiration = time.gmtime(int(time.time() + expires_in)) # Generate policy document conditions.append('{"bucket": "%s"}' % bucket_name) if key.endswith("${filename}"): conditions.append('["starts-with", "$key", "%s"]' % key[:-len("${filename}")]) else: conditions.append('{"key": "%s"}' % key) if acl: conditions.append('{"acl": "%s"}' % acl) fields.append({ "name": "acl", "value": acl}) if success_action_redirect: conditions.append('{"success_action_redirect": "%s"}' % success_action_redirect) fields.append({ "name": "success_action_redirect", "value": success_action_redirect}) if max_content_length: conditions.append('["content-length-range", 0, %i]' % max_content_length) fields.append({"name":'content-length-range', "value": "0,%i" % max_content_length}) policy = self.build_post_policy(expiration, conditions) # Add the base64-encoded policy document as the 'policy' field policy_b64 = base64.b64encode(policy) fields.append({"name": "policy", "value": policy_b64}) # Add the AWS access key as the 'AWSAccessKeyId' field fields.append({"name": "AWSAccessKeyId", "value": self.aws_access_key_id}) # Add signature for encoded policy document as the 'AWSAccessKeyId' field signature = self._auth_handler.sign_string(policy_b64) fields.append({"name": "signature", "value": signature}) fields.append({"name": "key", "value": key}) # HTTPS protocol will be used if the secure HTTP option is enabled. url = '%s://%s/' % (http_method, self.calling_format.build_host(self.server_name(), bucket_name)) return {"action": url, "fields": fields} def generate_url(self, expires_in, method, bucket='', key='', headers=None, query_auth=True, force_http=False, response_headers=None): if not headers: headers = {} expires = int(time.time() + expires_in) auth_path = self.calling_format.build_auth_path(bucket, key) auth_path = self.get_path(auth_path) # Arguments to override response headers become part of the canonical # string to be signed. if response_headers: response_hdrs = ["%s=%s" % (k, v) for k, v in response_headers.items()] delimiter = '?' if '?' not in auth_path else '&' auth_path = "%s%s%s" % (auth_path, delimiter, '&'.join(response_hdrs)) else: response_headers = {} c_string = boto.utils.canonical_string(method, auth_path, headers, expires, self.provider) b64_hmac = self._auth_handler.sign_string(c_string) encoded_canonical = urllib.quote_plus(b64_hmac) self.calling_format.build_path_base(bucket, key) if query_auth: query_part = '?' + self.QueryString % (encoded_canonical, expires, self.aws_access_key_id) # The response headers must also be GET parameters in the URL. headers.update(response_headers) hdrs = [ '%s=%s'%(name, urllib.quote(val)) for name,val in headers.items() ] q_str = '&'.join(hdrs) if q_str: query_part += '&' + q_str else: query_part = '' if force_http: protocol = 'http' port = 80 else: protocol = self.protocol port = self.port return self.calling_format.build_url_base(self, protocol, self.server_name(port), bucket, key) + query_part def get_all_buckets(self, headers=None): response = self.make_request('GET', headers=headers) body = response.read() if response.status > 300: raise self.provider.storage_response_error( response.status, response.reason, body) rs = ResultSet([('Bucket', self.bucket_class)]) h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs def get_canonical_user_id(self, headers=None): """ Convenience method that returns the "CanonicalUserID" of the user who's credentials are associated with the connection. The only way to get this value is to do a GET request on the service which returns all buckets associated with the account. As part of that response, the canonical userid is returned. This method simply does all of that and then returns just the user id. :rtype: string :return: A string containing the canonical user id. """ rs = self.get_all_buckets(headers=headers) return rs.ID def get_bucket(self, bucket_name, validate=True, headers=None): bucket = self.bucket_class(self, bucket_name) if validate: bucket.get_all_keys(headers, maxkeys=0) return bucket def lookup(self, bucket_name, validate=True, headers=None): try: bucket = self.get_bucket(bucket_name, validate, headers=headers) except: bucket = None return bucket def create_bucket(self, bucket_name, headers=None, location=Location.DEFAULT, policy=None): """ Creates a new located bucket. By default it's in the USA. You can pass Location.EU to create an European bucket. :type bucket_name: string :param bucket_name: The name of the new bucket :type headers: dict :param headers: Additional headers to pass along with the request to AWS. :type location: :class:`boto.s3.connection.Location` :param location: The location of the new bucket :type policy: :class:`boto.s3.acl.CannedACLStrings` :param policy: A canned ACL policy that will be applied to the new key in S3. """ check_lowercase_bucketname(bucket_name) if policy: if headers: headers[self.provider.acl_header] = policy else: headers = {self.provider.acl_header : policy} if location == Location.DEFAULT: data = '' else: data = '' + \ location + '' response = self.make_request('PUT', bucket_name, headers=headers, data=data) body = response.read() if response.status == 409: raise self.provider.storage_create_error( response.status, response.reason, body) if response.status == 200: return self.bucket_class(self, bucket_name) else: raise self.provider.storage_response_error( response.status, response.reason, body) def delete_bucket(self, bucket, headers=None): response = self.make_request('DELETE', bucket, headers=headers) body = response.read() if response.status != 204: raise self.provider.storage_response_error( response.status, response.reason, body) def make_request(self, method, bucket='', key='', headers=None, data='', query_args=None, sender=None, override_num_retries=None): if isinstance(bucket, self.bucket_class): bucket = bucket.name if isinstance(key, Key): key = key.name path = self.calling_format.build_path_base(bucket, key) boto.log.debug('path=%s' % path) auth_path = self.calling_format.build_auth_path(bucket, key) boto.log.debug('auth_path=%s' % auth_path) host = self.calling_format.build_host(self.server_name(), bucket) if query_args: path += '?' + query_args boto.log.debug('path=%s' % path) auth_path += '?' + query_args boto.log.debug('auth_path=%s' % auth_path) return AWSAuthConnection.make_request(self, method, path, headers, data, host, auth_path, sender, override_num_retries=override_num_retries) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/s3/deletemarker.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.s3.user import User class DeleteMarker: def __init__(self, bucket=None, name=None): self.bucket = bucket self.name = name self.is_latest = False self.last_modified = None self.owner = None def startElement(self, name, attrs, connection): if name == 'Owner': self.owner = User(self) return self.owner else: return None def endElement(self, name, value, connection): if name == 'Key': self.name = value.encode('utf-8') elif name == 'IsLatest': if value == 'true': self.is_lastest = True else: self.is_latest = False elif name == 'LastModified': self.last_modified = value elif name == 'Owner': pass elif name == 'VersionId': self.version_id = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/s3/key.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Nexenta Systems Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import mimetypes import os import re import rfc822 import StringIO import base64 import boto.utils from boto.exception import BotoClientError from boto.provider import Provider from boto.s3.user import User from boto import UserAgent try: from hashlib import md5 except ImportError: from md5 import md5 class Key(object): DefaultContentType = 'application/octet-stream' BufferSize = 8192 def __init__(self, bucket=None, name=None): self.bucket = bucket self.name = name self.metadata = {} self.cache_control = None self.content_type = self.DefaultContentType self.content_encoding = None self.filename = None self.etag = None self.last_modified = None self.owner = None self.storage_class = 'STANDARD' self.md5 = None self.base64md5 = None self.path = None self.resp = None self.mode = None self.size = None self.version_id = None self.source_version_id = None self.delete_marker = False self.encrypted = None def __repr__(self): if self.bucket: return '' % (self.bucket.name, self.name) else: return '' % self.name def __getattr__(self, name): if name == 'key': return self.name else: raise AttributeError def __setattr__(self, name, value): if name == 'key': self.__dict__['name'] = value else: self.__dict__[name] = value def __iter__(self): return self @property def provider(self): provider = None if self.bucket: if self.bucket.connection: provider = self.bucket.connection.provider return provider def get_md5_from_hexdigest(self, md5_hexdigest): """ A utility function to create the 2-tuple (md5hexdigest, base64md5) from just having a precalculated md5_hexdigest. """ import binascii digest = binascii.unhexlify(md5_hexdigest) base64md5 = base64.encodestring(digest) if base64md5[-1] == '\n': base64md5 = base64md5[0:-1] return (md5_hexdigest, base64md5) def handle_encryption_headers(self, resp): provider = self.bucket.connection.provider if provider.server_side_encryption_header: self.encrypted = resp.getheader(provider.server_side_encryption_header, None) else: self.encrypted = None def handle_version_headers(self, resp, force=False): provider = self.bucket.connection.provider # If the Key object already has a version_id attribute value, it # means that it represents an explicit version and the user is # doing a get_contents_*(version_id=) to retrieve another # version of the Key. In that case, we don't really want to # overwrite the version_id in this Key object. Comprende? if self.version_id is None or force: self.version_id = resp.getheader(provider.version_id, None) self.source_version_id = resp.getheader(provider.copy_source_version_id, None) if resp.getheader(provider.delete_marker, 'false') == 'true': self.delete_marker = True else: self.delete_marker = False def open_read(self, headers=None, query_args=None, override_num_retries=None, response_headers=None): """ Open this key for reading :type headers: dict :param headers: Headers to pass in the web request :type query_args: string :param query_args: Arguments to pass in the query string (ie, 'torrent') :type override_num_retries: int :param override_num_retries: If not None will override configured num_retries parameter for underlying GET. :type response_headers: dict :param response_headers: A dictionary containing HTTP headers/values that will override any headers associated with the stored object in the response. See http://goo.gl/EWOPb for details. """ if self.resp == None: self.mode = 'r' provider = self.bucket.connection.provider self.resp = self.bucket.connection.make_request( 'GET', self.bucket.name, self.name, headers, query_args=query_args, override_num_retries=override_num_retries) if self.resp.status < 199 or self.resp.status > 299: body = self.resp.read() raise provider.storage_response_error(self.resp.status, self.resp.reason, body) response_headers = self.resp.msg self.metadata = boto.utils.get_aws_metadata(response_headers, provider) for name,value in response_headers.items(): # To get correct size for Range GETs, use Content-Range # header if one was returned. If not, use Content-Length # header. if (name.lower() == 'content-length' and 'Content-Range' not in response_headers): self.size = int(value) elif name.lower() == 'content-range': end_range = re.sub('.*/(.*)', '\\1', value) self.size = int(end_range) elif name.lower() == 'etag': self.etag = value elif name.lower() == 'content-type': self.content_type = value elif name.lower() == 'content-encoding': self.content_encoding = value elif name.lower() == 'last-modified': self.last_modified = value elif name.lower() == 'cache-control': self.cache_control = value self.handle_version_headers(self.resp) self.handle_encryption_headers(self.resp) def open_write(self, headers=None, override_num_retries=None): """ Open this key for writing. Not yet implemented :type headers: dict :param headers: Headers to pass in the write request :type override_num_retries: int :param override_num_retries: If not None will override configured num_retries parameter for underlying PUT. """ raise BotoClientError('Not Implemented') def open(self, mode='r', headers=None, query_args=None, override_num_retries=None): if mode == 'r': self.mode = 'r' self.open_read(headers=headers, query_args=query_args, override_num_retries=override_num_retries) elif mode == 'w': self.mode = 'w' self.open_write(headers=headers, override_num_retries=override_num_retries) else: raise BotoClientError('Invalid mode: %s' % mode) closed = False def close(self): if self.resp: self.resp.read() self.resp = None self.mode = None self.closed = True def next(self): """ By providing a next method, the key object supports use as an iterator. For example, you can now say: for bytes in key: write bytes to a file or whatever All of the HTTP connection stuff is handled for you. """ self.open_read() data = self.resp.read(self.BufferSize) if not data: self.close() raise StopIteration return data def read(self, size=0): self.open_read() if size == 0: data = self.resp.read() else: data = self.resp.read(size) if not data: self.close() return data def change_storage_class(self, new_storage_class, dst_bucket=None): """ Change the storage class of an existing key. Depending on whether a different destination bucket is supplied or not, this will either move the item within the bucket, preserving all metadata and ACL info bucket changing the storage class or it will copy the item to the provided destination bucket, also preserving metadata and ACL info. :type new_storage_class: string :param new_storage_class: The new storage class for the Key. Possible values are: * STANDARD * REDUCED_REDUNDANCY :type dst_bucket: string :param dst_bucket: The name of a destination bucket. If not provided the current bucket of the key will be used. """ if new_storage_class == 'STANDARD': return self.copy(self.bucket.name, self.name, reduced_redundancy=False, preserve_acl=True) elif new_storage_class == 'REDUCED_REDUNDANCY': return self.copy(self.bucket.name, self.name, reduced_redundancy=True, preserve_acl=True) else: raise BotoClientError('Invalid storage class: %s' % new_storage_class) def copy(self, dst_bucket, dst_key, metadata=None, reduced_redundancy=False, preserve_acl=False, encrypt_key=False): """ Copy this Key to another bucket. :type dst_bucket: string :param dst_bucket: The name of the destination bucket :type dst_key: string :param dst_key: The name of the destination key :type metadata: dict :param metadata: Metadata to be associated with new key. If metadata is supplied, it will replace the metadata of the source key being copied. If no metadata is supplied, the source key's metadata will be copied to the new key. :type reduced_redundancy: bool :param reduced_redundancy: If True, this will force the storage class of the new Key to be REDUCED_REDUNDANCY regardless of the storage class of the key being copied. The Reduced Redundancy Storage (RRS) feature of S3, provides lower redundancy at lower storage cost. :type preserve_acl: bool :param preserve_acl: If True, the ACL from the source key will be copied to the destination key. If False, the destination key will have the default ACL. Note that preserving the ACL in the new key object will require two additional API calls to S3, one to retrieve the current ACL and one to set that ACL on the new object. If you don't care about the ACL, a value of False will be significantly more efficient. :type encrypt_key: bool :param encrypt_key: If True, the new copy of the object will be encrypted on the server-side by S3 and will be stored in an encrypted form while at rest in S3. :rtype: :class:`boto.s3.key.Key` or subclass :returns: An instance of the newly created key object """ dst_bucket = self.bucket.connection.lookup(dst_bucket) if reduced_redundancy: storage_class = 'REDUCED_REDUNDANCY' else: storage_class = self.storage_class return dst_bucket.copy_key(dst_key, self.bucket.name, self.name, metadata, storage_class=storage_class, preserve_acl=preserve_acl, encrypt_key=encrypt_key) def startElement(self, name, attrs, connection): if name == 'Owner': self.owner = User(self) return self.owner else: return None def endElement(self, name, value, connection): if name == 'Key': self.name = value.encode('utf-8') elif name == 'ETag': self.etag = value elif name == 'LastModified': self.last_modified = value elif name == 'Size': self.size = int(value) elif name == 'StorageClass': self.storage_class = value elif name == 'Owner': pass elif name == 'VersionId': self.version_id = value else: setattr(self, name, value) def exists(self): """ Returns True if the key exists :rtype: bool :return: Whether the key exists on S3 """ return bool(self.bucket.lookup(self.name)) def delete(self): """ Delete this key from S3 """ return self.bucket.delete_key(self.name, version_id=self.version_id) def get_metadata(self, name): return self.metadata.get(name) def set_metadata(self, name, value): self.metadata[name] = value def update_metadata(self, d): self.metadata.update(d) # convenience methods for setting/getting ACL def set_acl(self, acl_str, headers=None): if self.bucket != None: self.bucket.set_acl(acl_str, self.name, headers=headers) def get_acl(self, headers=None): if self.bucket != None: return self.bucket.get_acl(self.name, headers=headers) def get_xml_acl(self, headers=None): if self.bucket != None: return self.bucket.get_xml_acl(self.name, headers=headers) def set_xml_acl(self, acl_str, headers=None): if self.bucket != None: return self.bucket.set_xml_acl(acl_str, self.name, headers=headers) def set_canned_acl(self, acl_str, headers=None): return self.bucket.set_canned_acl(acl_str, self.name, headers) def make_public(self, headers=None): return self.bucket.set_canned_acl('public-read', self.name, headers) def generate_url(self, expires_in, method='GET', headers=None, query_auth=True, force_http=False, response_headers=None): """ Generate a URL to access this key. :type expires_in: int :param expires_in: How long the url is valid for, in seconds :type method: string :param method: The method to use for retrieving the file (default is GET) :type headers: dict :param headers: Any headers to pass along in the request :type query_auth: bool :param query_auth: :rtype: string :return: The URL to access the key """ return self.bucket.connection.generate_url(expires_in, method, self.bucket.name, self.name, headers, query_auth, force_http, response_headers) def send_file(self, fp, headers=None, cb=None, num_cb=10, query_args=None, chunked_transfer=False): """ Upload a file to a key into a bucket on S3. :type fp: file :param fp: The file pointer to upload :type headers: dict :param headers: The headers to pass along with the PUT request :type cb: function :param cb: a callback function that will be called to report progress on the upload. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted to S3 and the second representing the size of the to be transmitted object. :type num_cb: int :param num_cb: (optional) If a callback is specified with the cb parameter this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. Providing a negative integer will cause your callback to be called with each buffer read. """ provider = self.bucket.connection.provider def sender(http_conn, method, path, data, headers): http_conn.putrequest(method, path) for key in headers: http_conn.putheader(key, headers[key]) http_conn.endheaders() if chunked_transfer: # MD5 for the stream has to be calculated on the fly, as # we don't know the size of the stream before hand. m = md5() else: fp.seek(0) save_debug = self.bucket.connection.debug self.bucket.connection.debug = 0 # If the debuglevel < 3 we don't want to show connection # payload, so turn off HTTP connection-level debug output (to # be restored below). # Use the getattr approach to allow this to work in AppEngine. if getattr(http_conn, 'debuglevel', 0) < 3: http_conn.set_debuglevel(0) if cb: if chunked_transfer: # For chunked Transfer, we call the cb for every 1MB # of data transferred. cb_count = (1024 * 1024)/self.BufferSize self.size = 0 elif num_cb > 2: cb_count = self.size / self.BufferSize / (num_cb-2) elif num_cb < 0: cb_count = -1 else: cb_count = 0 i = total_bytes = 0 cb(total_bytes, self.size) l = fp.read(self.BufferSize) while len(l) > 0: if chunked_transfer: http_conn.send('%x;\r\n' % len(l)) http_conn.send(l) http_conn.send('\r\n') else: http_conn.send(l) if cb: total_bytes += len(l) i += 1 if i == cb_count or cb_count == -1: cb(total_bytes, self.size) i = 0 if chunked_transfer: m.update(l) l = fp.read(self.BufferSize) if chunked_transfer: http_conn.send('0\r\n') http_conn.send('\r\n') if cb: self.size = total_bytes # Get the md5 which is calculated on the fly. self.md5 = m.hexdigest() else: fp.seek(0) if cb: cb(total_bytes, self.size) response = http_conn.getresponse() body = response.read() http_conn.set_debuglevel(save_debug) self.bucket.connection.debug = save_debug if ((response.status == 500 or response.status == 503 or response.getheader('location')) and not chunked_transfer): # we'll try again. return response elif response.status >= 200 and response.status <= 299: self.etag = response.getheader('etag') if self.etag != '"%s"' % self.md5: raise provider.storage_data_error( 'ETag from S3 did not match computed MD5') return response else: raise provider.storage_response_error( response.status, response.reason, body) if not headers: headers = {} else: headers = headers.copy() headers['User-Agent'] = UserAgent if self.base64md5: headers['Content-MD5'] = self.base64md5 if self.storage_class != 'STANDARD': headers[provider.storage_class_header] = self.storage_class if headers.has_key('Content-Encoding'): self.content_encoding = headers['Content-Encoding'] if headers.has_key('Content-Type'): self.content_type = headers['Content-Type'] elif self.path: self.content_type = mimetypes.guess_type(self.path)[0] if self.content_type == None: self.content_type = self.DefaultContentType headers['Content-Type'] = self.content_type else: headers['Content-Type'] = self.content_type if not chunked_transfer: headers['Content-Length'] = str(self.size) headers['Expect'] = '100-Continue' headers = boto.utils.merge_meta(headers, self.metadata, provider) resp = self.bucket.connection.make_request('PUT', self.bucket.name, self.name, headers, sender=sender, query_args=query_args) self.handle_version_headers(resp, force=True) def compute_md5(self, fp): """ :type fp: file :param fp: File pointer to the file to MD5 hash. The file pointer will be reset to the beginning of the file before the method returns. :rtype: tuple :return: A tuple containing the hex digest version of the MD5 hash as the first element and the base64 encoded version of the plain digest as the second element. """ m = md5() fp.seek(0) s = fp.read(self.BufferSize) while s: m.update(s) s = fp.read(self.BufferSize) hex_md5 = m.hexdigest() base64md5 = base64.encodestring(m.digest()) if base64md5[-1] == '\n': base64md5 = base64md5[0:-1] self.size = fp.tell() fp.seek(0) return (hex_md5, base64md5) def set_contents_from_stream(self, fp, headers=None, replace=True, cb=None, num_cb=10, policy=None, reduced_redundancy=False, query_args=None): """ Store an object using the name of the Key object as the key in cloud and the contents of the data stream pointed to by 'fp' as the contents. The stream object is not seekable and total size is not known. This has the implication that we can't specify the Content-Size and Content-MD5 in the header. So for huge uploads, the delay in calculating MD5 is avoided but with a penalty of inability to verify the integrity of the uploaded data. :type fp: file :param fp: the file whose contents are to be uploaded :type headers: dict :param headers: additional HTTP headers to be sent with the PUT request. :type replace: bool :param replace: If this parameter is False, the method will first check to see if an object exists in the bucket with the same key. If it does, it won't overwrite it. The default value is True which will overwrite the object. :type cb: function :param cb: a callback function that will be called to report progress on the upload. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted to GS and the second representing the total number of bytes that need to be transmitted. :type num_cb: int :param num_cb: (optional) If a callback is specified with the cb parameter, this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. :type policy: :class:`boto.gs.acl.CannedACLStrings` :param policy: A canned ACL policy that will be applied to the new key in GS. :type reduced_redundancy: bool :param reduced_redundancy: If True, this will set the storage class of the new Key to be REDUCED_REDUNDANCY. The Reduced Redundancy Storage (RRS) feature of S3, provides lower redundancy at lower storage cost. """ provider = self.bucket.connection.provider if not provider.supports_chunked_transfer(): raise BotoClientError('%s does not support chunked transfer' % provider.get_provider_name()) # Name of the Object should be specified explicitly for Streams. if not self.name or self.name == '': raise BotoClientError('Cannot determine the destination ' 'object name for the given stream') if headers is None: headers = {} if policy: headers[provider.acl_header] = policy # Set the Transfer Encoding for Streams. headers['Transfer-Encoding'] = 'chunked' if reduced_redundancy: self.storage_class = 'REDUCED_REDUNDANCY' if provider.storage_class_header: headers[provider.storage_class_header] = self.storage_class if self.bucket != None: if not replace: k = self.bucket.lookup(self.name) if k: return self.send_file(fp, headers, cb, num_cb, query_args, chunked_transfer=True) def set_contents_from_file(self, fp, headers=None, replace=True, cb=None, num_cb=10, policy=None, md5=None, reduced_redundancy=False, query_args=None, encrypt_key=False): """ Store an object in S3 using the name of the Key object as the key in S3 and the contents of the file pointed to by 'fp' as the contents. :type fp: file :param fp: the file whose contents to upload :type headers: dict :param headers: Additional HTTP headers that will be sent with the PUT request. :type replace: bool :param replace: If this parameter is False, the method will first check to see if an object exists in the bucket with the same key. If it does, it won't overwrite it. The default value is True which will overwrite the object. :type cb: function :param cb: a callback function that will be called to report progress on the upload. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted to S3 and the second representing the size of the to be transmitted object. :type cb: int :param num_cb: (optional) If a callback is specified with the cb parameter this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. :type policy: :class:`boto.s3.acl.CannedACLStrings` :param policy: A canned ACL policy that will be applied to the new key in S3. :type md5: A tuple containing the hexdigest version of the MD5 checksum of the file as the first element and the Base64-encoded version of the plain checksum as the second element. This is the same format returned by the compute_md5 method. :param md5: If you need to compute the MD5 for any reason prior to upload, it's silly to have to do it twice so this param, if present, will be used as the MD5 values of the file. Otherwise, the checksum will be computed. :type reduced_redundancy: bool :param reduced_redundancy: If True, this will set the storage class of the new Key to be REDUCED_REDUNDANCY. The Reduced Redundancy Storage (RRS) feature of S3, provides lower redundancy at lower storage cost. :type encrypt_key: bool :param encrypt_key: If True, the new copy of the object will be encrypted on the server-side by S3 and will be stored in an encrypted form while at rest in S3. """ provider = self.bucket.connection.provider if headers is None: headers = {} if policy: headers[provider.acl_header] = policy if encrypt_key: headers[provider.server_side_encryption_header] = 'AES256' if reduced_redundancy: self.storage_class = 'REDUCED_REDUNDANCY' if provider.storage_class_header: headers[provider.storage_class_header] = self.storage_class # TODO - What if provider doesn't support reduced reduncancy? # What if different providers provide different classes? if hasattr(fp, 'name'): self.path = fp.name if self.bucket != None: if not md5: md5 = self.compute_md5(fp) else: # even if md5 is provided, still need to set size of content fp.seek(0, 2) self.size = fp.tell() fp.seek(0) self.md5 = md5[0] self.base64md5 = md5[1] if self.name == None: self.name = self.md5 if not replace: k = self.bucket.lookup(self.name) if k: return self.send_file(fp, headers, cb, num_cb, query_args) def set_contents_from_filename(self, filename, headers=None, replace=True, cb=None, num_cb=10, policy=None, md5=None, reduced_redundancy=False, encrypt_key=False): """ Store an object in S3 using the name of the Key object as the key in S3 and the contents of the file named by 'filename'. See set_contents_from_file method for details about the parameters. :type filename: string :param filename: The name of the file that you want to put onto S3 :type headers: dict :param headers: Additional headers to pass along with the request to AWS. :type replace: bool :param replace: If True, replaces the contents of the file if it already exists. :type cb: function :param cb: a callback function that will be called to report progress on the upload. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted to S3 and the second representing the size of the to be transmitted object. :type cb: int :param num_cb: (optional) If a callback is specified with the cb parameter this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. :type policy: :class:`boto.s3.acl.CannedACLStrings` :param policy: A canned ACL policy that will be applied to the new key in S3. :type md5: A tuple containing the hexdigest version of the MD5 checksum of the file as the first element and the Base64-encoded version of the plain checksum as the second element. This is the same format returned by the compute_md5 method. :param md5: If you need to compute the MD5 for any reason prior to upload, it's silly to have to do it twice so this param, if present, will be used as the MD5 values of the file. Otherwise, the checksum will be computed. :type reduced_redundancy: bool :param reduced_redundancy: If True, this will set the storage class of the new Key to be REDUCED_REDUNDANCY. The Reduced Redundancy Storage (RRS) feature of S3, provides lower redundancy at lower storage cost. :type encrypt_key: bool :param encrypt_key: If True, the new copy of the object will be encrypted on the server-side by S3 and will be stored in an encrypted form while at rest in S3. """ fp = open(filename, 'rb') self.set_contents_from_file(fp, headers, replace, cb, num_cb, policy, md5, reduced_redundancy, encrypt_key=encrypt_key) fp.close() def set_contents_from_string(self, s, headers=None, replace=True, cb=None, num_cb=10, policy=None, md5=None, reduced_redundancy=False, encrypt_key=False): """ Store an object in S3 using the name of the Key object as the key in S3 and the string 's' as the contents. See set_contents_from_file method for details about the parameters. :type headers: dict :param headers: Additional headers to pass along with the request to AWS. :type replace: bool :param replace: If True, replaces the contents of the file if it already exists. :type cb: function :param cb: a callback function that will be called to report progress on the upload. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted to S3 and the second representing the size of the to be transmitted object. :type cb: int :param num_cb: (optional) If a callback is specified with the cb parameter this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. :type policy: :class:`boto.s3.acl.CannedACLStrings` :param policy: A canned ACL policy that will be applied to the new key in S3. :type md5: A tuple containing the hexdigest version of the MD5 checksum of the file as the first element and the Base64-encoded version of the plain checksum as the second element. This is the same format returned by the compute_md5 method. :param md5: If you need to compute the MD5 for any reason prior to upload, it's silly to have to do it twice so this param, if present, will be used as the MD5 values of the file. Otherwise, the checksum will be computed. :type reduced_redundancy: bool :param reduced_redundancy: If True, this will set the storage class of the new Key to be REDUCED_REDUNDANCY. The Reduced Redundancy Storage (RRS) feature of S3, provides lower redundancy at lower storage cost. :type encrypt_key: bool :param encrypt_key: If True, the new copy of the object will be encrypted on the server-side by S3 and will be stored in an encrypted form while at rest in S3. """ if isinstance(s, unicode): s = s.encode("utf-8") fp = StringIO.StringIO(s) r = self.set_contents_from_file(fp, headers, replace, cb, num_cb, policy, md5, reduced_redundancy, encrypt_key=encrypt_key) fp.close() return r def get_file(self, fp, headers=None, cb=None, num_cb=10, torrent=False, version_id=None, override_num_retries=None, response_headers=None): """ Retrieves a file from an S3 Key :type fp: file :param fp: File pointer to put the data into :type headers: string :param: headers to send when retrieving the files :type cb: function :param cb: a callback function that will be called to report progress on the upload. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted to S3 and the second representing the size of the to be transmitted object. :type cb: int :param num_cb: (optional) If a callback is specified with the cb parameter this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. :type torrent: bool :param torrent: Flag for whether to get a torrent for the file :type override_num_retries: int :param override_num_retries: If not None will override configured num_retries parameter for underlying GET. :type response_headers: dict :param response_headers: A dictionary containing HTTP headers/values that will override any headers associated with the stored object in the response. See http://goo.gl/EWOPb for details. """ if cb: if num_cb > 2: cb_count = self.size / self.BufferSize / (num_cb-2) elif num_cb < 0: cb_count = -1 else: cb_count = 0 i = total_bytes = 0 cb(total_bytes, self.size) save_debug = self.bucket.connection.debug if self.bucket.connection.debug == 1: self.bucket.connection.debug = 0 query_args = [] if torrent: query_args.append('torrent') # If a version_id is passed in, use that. If not, check to see # if the Key object has an explicit version_id and, if so, use that. # Otherwise, don't pass a version_id query param. if version_id is None: version_id = self.version_id if version_id: query_args.append('versionId=%s' % version_id) if response_headers: for key in response_headers: query_args.append('%s=%s' % (key, response_headers[key])) query_args = '&'.join(query_args) self.open('r', headers, query_args=query_args, override_num_retries=override_num_retries) for bytes in self: fp.write(bytes) if cb: total_bytes += len(bytes) i += 1 if i == cb_count or cb_count == -1: cb(total_bytes, self.size) i = 0 if cb: cb(total_bytes, self.size) self.close() self.bucket.connection.debug = save_debug def get_torrent_file(self, fp, headers=None, cb=None, num_cb=10): """ Get a torrent file (see to get_file) :type fp: file :param fp: The file pointer of where to put the torrent :type headers: dict :param headers: Headers to be passed :type cb: function :param cb: a callback function that will be called to report progress on the upload. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted to S3 and the second representing the size of the to be transmitted object. :type cb: int :param num_cb: (optional) If a callback is specified with the cb parameter this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. """ return self.get_file(fp, headers, cb, num_cb, torrent=True) def get_contents_to_file(self, fp, headers=None, cb=None, num_cb=10, torrent=False, version_id=None, res_download_handler=None, response_headers=None): """ Retrieve an object from S3 using the name of the Key object as the key in S3. Write the contents of the object to the file pointed to by 'fp'. :type fp: File -like object :param fp: :type headers: dict :param headers: additional HTTP headers that will be sent with the GET request. :type cb: function :param cb: a callback function that will be called to report progress on the upload. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted to S3 and the second representing the size of the to be transmitted object. :type cb: int :param num_cb: (optional) If a callback is specified with the cb parameter this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. :type torrent: bool :param torrent: If True, returns the contents of a torrent file as a string. :type res_upload_handler: ResumableDownloadHandler :param res_download_handler: If provided, this handler will perform the download. :type response_headers: dict :param response_headers: A dictionary containing HTTP headers/values that will override any headers associated with the stored object in the response. See http://goo.gl/EWOPb for details. """ if self.bucket != None: if res_download_handler: res_download_handler.get_file(self, fp, headers, cb, num_cb, torrent=torrent, version_id=version_id) else: self.get_file(fp, headers, cb, num_cb, torrent=torrent, version_id=version_id, response_headers=response_headers) def get_contents_to_filename(self, filename, headers=None, cb=None, num_cb=10, torrent=False, version_id=None, res_download_handler=None, response_headers=None): """ Retrieve an object from S3 using the name of the Key object as the key in S3. Store contents of the object to a file named by 'filename'. See get_contents_to_file method for details about the parameters. :type filename: string :param filename: The filename of where to put the file contents :type headers: dict :param headers: Any additional headers to send in the request :type cb: function :param cb: a callback function that will be called to report progress on the upload. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted to S3 and the second representing the size of the to be transmitted object. :type cb: int :param num_cb: (optional) If a callback is specified with the cb parameter this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. :type torrent: bool :param torrent: If True, returns the contents of a torrent file as a string. :type res_upload_handler: ResumableDownloadHandler :param res_download_handler: If provided, this handler will perform the download. :type response_headers: dict :param response_headers: A dictionary containing HTTP headers/values that will override any headers associated with the stored object in the response. See http://goo.gl/EWOPb for details. """ fp = open(filename, 'wb') self.get_contents_to_file(fp, headers, cb, num_cb, torrent=torrent, version_id=version_id, res_download_handler=res_download_handler, response_headers=response_headers) fp.close() # if last_modified date was sent from s3, try to set file's timestamp if self.last_modified != None: try: modified_tuple = rfc822.parsedate_tz(self.last_modified) modified_stamp = int(rfc822.mktime_tz(modified_tuple)) os.utime(fp.name, (modified_stamp, modified_stamp)) except Exception: pass def get_contents_as_string(self, headers=None, cb=None, num_cb=10, torrent=False, version_id=None, response_headers=None): """ Retrieve an object from S3 using the name of the Key object as the key in S3. Return the contents of the object as a string. See get_contents_to_file method for details about the parameters. :type headers: dict :param headers: Any additional headers to send in the request :type cb: function :param cb: a callback function that will be called to report progress on the upload. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted to S3 and the second representing the size of the to be transmitted object. :type cb: int :param num_cb: (optional) If a callback is specified with the cb parameter this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. :type torrent: bool :param torrent: If True, returns the contents of a torrent file as a string. :type response_headers: dict :param response_headers: A dictionary containing HTTP headers/values that will override any headers associated with the stored object in the response. See http://goo.gl/EWOPb for details. :rtype: string :returns: The contents of the file as a string """ fp = StringIO.StringIO() self.get_contents_to_file(fp, headers, cb, num_cb, torrent=torrent, version_id=version_id, response_headers=response_headers) return fp.getvalue() def add_email_grant(self, permission, email_address, headers=None): """ Convenience method that provides a quick way to add an email grant to a key. This method retrieves the current ACL, creates a new grant based on the parameters passed in, adds that grant to the ACL and then PUT's the new ACL back to S3. :type permission: string :param permission: The permission being granted. Should be one of: (READ, WRITE, READ_ACP, WRITE_ACP, FULL_CONTROL). :type email_address: string :param email_address: The email address associated with the AWS account your are granting the permission to. :type recursive: boolean :param recursive: A boolean value to controls whether the command will apply the grant to all keys within the bucket or not. The default value is False. By passing a True value, the call will iterate through all keys in the bucket and apply the same grant to each key. CAUTION: If you have a lot of keys, this could take a long time! """ policy = self.get_acl(headers=headers) policy.acl.add_email_grant(permission, email_address) self.set_acl(policy, headers=headers) def add_user_grant(self, permission, user_id, headers=None, display_name=None): """ Convenience method that provides a quick way to add a canonical user grant to a key. This method retrieves the current ACL, creates a new grant based on the parameters passed in, adds that grant to the ACL and then PUT's the new ACL back to S3. :type permission: string :param permission: The permission being granted. Should be one of: (READ, WRITE, READ_ACP, WRITE_ACP, FULL_CONTROL). :type user_id: string :param user_id: The canonical user id associated with the AWS account your are granting the permission to. :type display_name: string :param display_name: An option string containing the user's Display Name. Only required on Walrus. """ policy = self.get_acl() policy.acl.add_user_grant(permission, user_id, display_name=display_name) self.set_acl(policy, headers=headers) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/s3/multipart.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import user import key from boto import handler import xml.sax class CompleteMultiPartUpload(object): """ Represents a completed MultiPart Upload. Contains the following useful attributes: * location - The URI of the completed upload * bucket_name - The name of the bucket in which the upload is contained * key_name - The name of the new, completed key * etag - The MD5 hash of the completed, combined upload """ def __init__(self, bucket=None): self.bucket = None self.location = None self.bucket_name = None self.key_name = None self.etag = None def __repr__(self): return '' % (self.bucket_name, self.key_name) def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'Location': self.location = value elif name == 'Bucket': self.bucket_name = value elif name == 'Key': self.key_name = value elif name == 'ETag': self.etag = value else: setattr(self, name, value) class Part(object): """ Represents a single part in a MultiPart upload. Attributes include: * part_number - The integer part number * last_modified - The last modified date of this part * etag - The MD5 hash of this part * size - The size, in bytes, of this part """ def __init__(self, bucket=None): self.bucket = bucket self.part_number = None self.last_modified = None self.etag = None self.size = None def __repr__(self): if isinstance(self.part_number, int): return '' % self.part_number else: return '' % None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'PartNumber': self.part_number = int(value) elif name == 'LastModified': self.last_modified = value elif name == 'ETag': self.etag = value elif name == 'Size': self.size = int(value) else: setattr(self, name, value) def part_lister(mpupload, part_number_marker=None): """ A generator function for listing parts of a multipart upload. """ more_results = True part = None while more_results: parts = mpupload.get_all_parts(None, part_number_marker) for part in parts: yield part part_number_marker = mpupload.next_part_number_marker more_results= mpupload.is_truncated class MultiPartUpload(object): """ Represents a MultiPart Upload operation. """ def __init__(self, bucket=None): self.bucket = bucket self.bucket_name = None self.key_name = None self.id = id self.initiator = None self.owner = None self.storage_class = None self.initiated = None self.part_number_marker = None self.next_part_number_marker = None self.max_parts = None self.is_truncated = False self._parts = None def __repr__(self): return '' % self.key_name def __iter__(self): return part_lister(self) def to_xml(self): self.get_all_parts() s = '\n' for part in self: s += ' \n' s += ' %d\n' % part.part_number s += ' %s\n' % part.etag s += ' \n' s += '' return s def startElement(self, name, attrs, connection): if name == 'Initiator': self.initiator = user.User(self) return self.initiator elif name == 'Owner': self.owner = user.User(self) return self.owner elif name == 'Part': part = Part(self.bucket) self._parts.append(part) return part return None def endElement(self, name, value, connection): if name == 'Bucket': self.bucket_name = value elif name == 'Key': self.key_name = value elif name == 'UploadId': self.id = value elif name == 'StorageClass': self.storage_class = value elif name == 'PartNumberMarker': self.part_number_marker = value elif name == 'NextPartNumberMarker': self.next_part_number_marker = value elif name == 'MaxParts': self.max_parts = int(value) elif name == 'IsTruncated': if value == 'true': self.is_truncated = True else: self.is_truncated = False else: setattr(self, name, value) def get_all_parts(self, max_parts=None, part_number_marker=None): """ Return the uploaded parts of this MultiPart Upload. This is a lower-level method that requires you to manually page through results. To simplify this process, you can just use the object itself as an iterator and it will automatically handle all of the paging with S3. """ self._parts = [] query_args = 'uploadId=%s' % self.id if max_parts: query_args += '&max_parts=%d' % max_parts if part_number_marker: query_args += '&part-number-marker=%s' % part_number_marker response = self.bucket.connection.make_request('GET', self.bucket.name, self.key_name, query_args=query_args) body = response.read() if response.status == 200: h = handler.XmlHandler(self, self) xml.sax.parseString(body, h) return self._parts def upload_part_from_file(self, fp, part_num, headers=None, replace=True, cb=None, num_cb=10, policy=None, md5=None): """ Upload another part of this MultiPart Upload. :type fp: file :param fp: The file object you want to upload. :type part_num: int :param part_num: The number of this part. The other parameters are exactly as defined for the :class:`boto.s3.key.Key` set_contents_from_file method. """ if part_num < 1: raise ValueError('Part numbers must be greater than zero') query_args = 'uploadId=%s&partNumber=%d' % (self.id, part_num) key = self.bucket.new_key(self.key_name) key.set_contents_from_file(fp, headers, replace, cb, num_cb, policy, md5, reduced_redundancy=False, query_args=query_args) def complete_upload(self): """ Complete the MultiPart Upload operation. This method should be called when all parts of the file have been successfully uploaded to S3. :rtype: :class:`boto.s3.multipart.CompletedMultiPartUpload` :returns: An object representing the completed upload. """ xml = self.to_xml() return self.bucket.complete_multipart_upload(self.key_name, self.id, xml) def cancel_upload(self): """ Cancels a MultiPart Upload operation. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads might or might not succeed. As a result, it might be necessary to abort a given multipart upload multiple times in order to completely free all storage consumed by all parts. """ self.bucket.cancel_multipart_upload(self.key_name, self.id) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/s3/prefix.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class Prefix(object): def __init__(self, bucket=None, name=None): self.bucket = bucket self.name = name def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'Prefix': self.name = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/s3/resumable_download_handler.py ================================================ # Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import errno import httplib import os import re import socket import time import boto from boto import config, storage_uri_for_key from boto.connection import AWSAuthConnection from boto.exception import ResumableDownloadException from boto.exception import ResumableTransferDisposition """ Resumable download handler. Resumable downloads will retry failed downloads, resuming at the byte count completed by the last download attempt. If too many retries happen with no progress (per configurable num_retries param), the download will be aborted. The caller can optionally specify a tracker_file_name param in the ResumableDownloadHandler constructor. If you do this, that file will save the state needed to allow retrying later, in a separate process (e.g., in a later run of gsutil). Note that resumable downloads work across providers (they depend only on support Range GETs), but this code is in the boto.s3 package because it is the wrong abstraction level to go in the top-level boto package. TODO: At some point we should refactor the code to have a storage_service package where all these provider-independent files go. """ class ByteTranslatingCallbackHandler(object): """ Proxy class that translates progress callbacks made by boto.s3.Key.get_file(), taking into account that we're resuming a download. """ def __init__(self, proxied_cb, download_start_point): self.proxied_cb = proxied_cb self.download_start_point = download_start_point def call(self, total_bytes_uploaded, total_size): self.proxied_cb(self.download_start_point + total_bytes_uploaded, total_size) def get_cur_file_size(fp, position_to_eof=False): """ Returns size of file, optionally leaving fp positioned at EOF. """ if not position_to_eof: cur_pos = fp.tell() fp.seek(0, os.SEEK_END) cur_file_size = fp.tell() if not position_to_eof: fp.seek(cur_pos, os.SEEK_SET) return cur_file_size class ResumableDownloadHandler(object): """ Handler for resumable downloads. """ ETAG_REGEX = '([a-z0-9]{32})\n' RETRYABLE_EXCEPTIONS = (httplib.HTTPException, IOError, socket.error, socket.gaierror) def __init__(self, tracker_file_name=None, num_retries=None): """ Constructor. Instantiate once for each downloaded file. :type tracker_file_name: string :param tracker_file_name: optional file name to save tracking info about this download. If supplied and the current process fails the download, it can be retried in a new process. If called with an existing file containing an unexpired timestamp, we'll resume the transfer for this file; else we'll start a new resumable download. :type num_retries: int :param num_retries: the number of times we'll re-try a resumable download making no progress. (Count resets every time we get progress, so download can span many more than this number of retries.) """ self.tracker_file_name = tracker_file_name self.num_retries = num_retries self.etag_value_for_current_download = None if tracker_file_name: self._load_tracker_file_etag() # Save download_start_point in instance state so caller can # find how much was transferred by this ResumableDownloadHandler # (across retries). self.download_start_point = None def _load_tracker_file_etag(self): f = None try: f = open(self.tracker_file_name, 'r') etag_line = f.readline() m = re.search(self.ETAG_REGEX, etag_line) if m: self.etag_value_for_current_download = m.group(1) else: print('Couldn\'t read etag in tracker file (%s). Restarting ' 'download from scratch.' % self.tracker_file_name) except IOError, e: # Ignore non-existent file (happens first time a download # is attempted on an object), but warn user for other errors. if e.errno != errno.ENOENT: # Will restart because # self.etag_value_for_current_download == None. print('Couldn\'t read URI tracker file (%s): %s. Restarting ' 'download from scratch.' % (self.tracker_file_name, e.strerror)) finally: if f: f.close() def _save_tracker_info(self, key): self.etag_value_for_current_download = key.etag.strip('"\'') if not self.tracker_file_name: return f = None try: f = open(self.tracker_file_name, 'w') f.write('%s\n' % self.etag_value_for_current_download) except IOError, e: raise ResumableDownloadException( 'Couldn\'t write tracker file (%s): %s.\nThis can happen' 'if you\'re using an incorrectly configured download tool\n' '(e.g., gsutil configured to save tracker files to an ' 'unwritable directory)' % (self.tracker_file_name, e.strerror), ResumableTransferDisposition.ABORT) finally: if f: f.close() def _remove_tracker_file(self): if (self.tracker_file_name and os.path.exists(self.tracker_file_name)): os.unlink(self.tracker_file_name) def _attempt_resumable_download(self, key, fp, headers, cb, num_cb, torrent, version_id): """ Attempts a resumable download. Raises ResumableDownloadException if any problems occur. """ cur_file_size = get_cur_file_size(fp, position_to_eof=True) if (cur_file_size and self.etag_value_for_current_download and self.etag_value_for_current_download == key.etag.strip('"\'')): # Try to resume existing transfer. if cur_file_size > key.size: raise ResumableDownloadException( '%s is larger (%d) than %s (%d).\nDeleting tracker file, so ' 'if you re-try this download it will start from scratch' % (fp.name, cur_file_size, str(storage_uri_for_key(key)), key.size), ResumableTransferDisposition.ABORT) elif cur_file_size == key.size: if key.bucket.connection.debug >= 1: print 'Download complete.' return if key.bucket.connection.debug >= 1: print 'Resuming download.' headers = headers.copy() headers['Range'] = 'bytes=%d-%d' % (cur_file_size, key.size - 1) cb = ByteTranslatingCallbackHandler(cb, cur_file_size).call self.download_start_point = cur_file_size else: if key.bucket.connection.debug >= 1: print 'Starting new resumable download.' self._save_tracker_info(key) self.download_start_point = 0 # Truncate the file, in case a new resumable download is being # started atop an existing file. fp.truncate(0) # Disable AWSAuthConnection-level retry behavior, since that would # cause downloads to restart from scratch. key.get_file(fp, headers, cb, num_cb, torrent, version_id, override_num_retries=0) fp.flush() def _check_final_md5(self, key, file_name): """ Checks that etag from server agrees with md5 computed after the download completes. This is important, since the download could have spanned a number of hours and multiple processes (e.g., gsutil runs), and the user could change some of the file and not realize they have inconsistent data. """ fp = open(file_name, 'r') if key.bucket.connection.debug >= 1: print 'Checking md5 against etag.' hex_md5 = key.compute_md5(fp)[0] if hex_md5 != key.etag.strip('"\''): file_name = fp.name fp.close() os.unlink(file_name) raise ResumableDownloadException( 'File changed during download: md5 signature doesn\'t match ' 'etag (incorrect downloaded file deleted)', ResumableTransferDisposition.ABORT) def get_file(self, key, fp, headers, cb=None, num_cb=10, torrent=False, version_id=None): """ Retrieves a file from a Key :type key: :class:`boto.s3.key.Key` or subclass :param key: The Key object from which upload is to be downloaded :type fp: file :param fp: File pointer into which data should be downloaded :type headers: string :param: headers to send when retrieving the files :type cb: function :param cb: (optional) a callback function that will be called to report progress on the download. The callback should accept two integer parameters, the first representing the number of bytes that have been successfully transmitted from the storage service and the second representing the total number of bytes that need to be transmitted. :type num_cb: int :param num_cb: (optional) If a callback is specified with the cb parameter this parameter determines the granularity of the callback by defining the maximum number of times the callback will be called during the file transfer. :type torrent: bool :param torrent: Flag for whether to get a torrent for the file :type version_id: string :param version_id: The version ID (optional) Raises ResumableDownloadException if a problem occurs during the transfer. """ debug = key.bucket.connection.debug if not headers: headers = {} # Use num-retries from constructor if one was provided; else check # for a value specified in the boto config file; else default to 5. if self.num_retries is None: self.num_retries = config.getint('Boto', 'num_retries', 5) progress_less_iterations = 0 while True: # Retry as long as we're making progress. had_file_bytes_before_attempt = get_cur_file_size(fp) try: self._attempt_resumable_download(key, fp, headers, cb, num_cb, torrent, version_id) # Download succceded, so remove the tracker file (if have one). self._remove_tracker_file() self._check_final_md5(key, fp.name) if debug >= 1: print 'Resumable download complete.' return except self.RETRYABLE_EXCEPTIONS, e: if debug >= 1: print('Caught exception (%s)' % e.__repr__()) if isinstance(e, IOError) and e.errno == errno.EPIPE: # Broken pipe error causes httplib to immediately # close the socket (http://bugs.python.org/issue5542), # so we need to close and reopen the key before resuming # the download. key.get_file(fp, headers, cb, num_cb, torrent, version_id, override_num_retries=0) except ResumableDownloadException, e: if (e.disposition == ResumableTransferDisposition.ABORT_CUR_PROCESS): if debug >= 1: print('Caught non-retryable ResumableDownloadException ' '(%s)' % e.message) raise elif (e.disposition == ResumableTransferDisposition.ABORT): if debug >= 1: print('Caught non-retryable ResumableDownloadException ' '(%s); aborting and removing tracker file' % e.message) self._remove_tracker_file() raise else: if debug >= 1: print('Caught ResumableDownloadException (%s) - will ' 'retry' % e.message) # At this point we had a re-tryable failure; see if made progress. if get_cur_file_size(fp) > had_file_bytes_before_attempt: progress_less_iterations = 0 else: progress_less_iterations += 1 if progress_less_iterations > self.num_retries: # Don't retry any longer in the current process. raise ResumableDownloadException( 'Too many resumable download attempts failed without ' 'progress. You might try this download again later', ResumableTransferDisposition.ABORT_CUR_PROCESS) # Close the key, in case a previous download died partway # through and left data in the underlying key HTTP buffer. # Do this within a try/except block in case the connection is # closed (since key.close() attempts to do a final read, in which # case this read attempt would get an IncompleteRead exception, # which we can safely ignore. try: key.close() except httplib.IncompleteRead: pass sleep_time_secs = 2**progress_less_iterations if debug >= 1: print('Got retryable failure (%d progress-less in a row).\n' 'Sleeping %d seconds before re-trying' % (progress_less_iterations, sleep_time_secs)) time.sleep(sleep_time_secs) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/s3/user.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class User: def __init__(self, parent=None, id='', display_name=''): if parent: parent.owner = self self.type = None self.id = id self.display_name = display_name def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'DisplayName': self.display_name = value elif name == 'ID': self.id = value else: setattr(self, name, value) def to_xml(self, element_name='Owner'): if self.type: s = '<%s xsi:type="%s">' % (element_name, self.type) else: s = '<%s>' % element_name s += '%s' % self.id s += '%s' % self.display_name s += '' % element_name return s ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/__init__.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # from regioninfo import SDBRegionInfo def regions(): """ Get all available regions for the SDB service. :rtype: list :return: A list of :class:`boto.sdb.regioninfo.RegionInfo` instances """ return [SDBRegionInfo(name='us-east-1', endpoint='sdb.amazonaws.com'), SDBRegionInfo(name='eu-west-1', endpoint='sdb.eu-west-1.amazonaws.com'), SDBRegionInfo(name='us-west-1', endpoint='sdb.us-west-1.amazonaws.com'), SDBRegionInfo(name='ap-northeast-1', endpoint='sdb.ap-northeast-1.amazonaws.com'), SDBRegionInfo(name='ap-southeast-1', endpoint='sdb.ap-southeast-1.amazonaws.com') ] def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.sdb.connection.SDBConnection`. :type: str :param region_name: The name of the region to connect to. :rtype: :class:`boto.sdb.connection.SDBConnection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ for region in regions(): if region.name == region_name: return region.connect(**kw_params) return None def get_region(region_name, **kw_params): """ Find and return a :class:`boto.sdb.regioninfo.RegionInfo` object given a region name. :type: str :param: The name of the region. :rtype: :class:`boto.sdb.regioninfo.RegionInfo` :return: The RegionInfo object for the given region or None if an invalid region name is provided. """ for region in regions(**kw_params): if region.name == region_name: return region return None ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/connection.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import xml.sax import threading import boto from boto import handler from boto.connection import AWSQueryConnection from boto.sdb.domain import Domain, DomainMetaData from boto.sdb.item import Item from boto.sdb.regioninfo import SDBRegionInfo from boto.exception import SDBResponseError class ItemThread(threading.Thread): """ A threaded :class:`Item ` retriever utility class. Retrieved :class:`Item ` objects are stored in the ``items`` instance variable after :py:meth:`run() ` is called. .. tip:: The item retrieval will not start until the :func:`run() ` method is called. """ def __init__(self, name, domain_name, item_names): """ :param str name: A thread name. Used for identification. :param str domain_name: The name of a SimpleDB :class:`Domain ` :type item_names: string or list of strings :param item_names: The name(s) of the items to retrieve from the specified :class:`Domain `. :ivar list items: A list of items retrieved. Starts as empty list. """ threading.Thread.__init__(self, name=name) #print 'starting %s with %d items' % (name, len(item_names)) self.domain_name = domain_name self.conn = SDBConnection() self.item_names = item_names self.items = [] def run(self): """ Start the threaded retrieval of items. Populates the ``items`` list with :class:`Item ` objects. """ for item_name in self.item_names: item = self.conn.get_attributes(self.domain_name, item_name) self.items.append(item) #boto.set_stream_logger('sdb') class SDBConnection(AWSQueryConnection): """ This class serves as a gateway to your SimpleDB region (defaults to us-east-1). Methods within allow access to SimpleDB :class:`Domain ` objects and their associated :class:`Item ` objects. .. tip:: While you may instantiate this class directly, it may be easier to go through :py:func:`boto.connect_sdb`. """ DefaultRegionName = 'us-east-1' DefaultRegionEndpoint = 'sdb.amazonaws.com' APIVersion = '2009-04-15' ResponseError = SDBResponseError def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, region=None, path='/', converter=None, security_token=None): """ For any keywords that aren't documented, refer to the parent class, :py:class:`boto.connection.AWSAuthConnection`. You can avoid having to worry about these keyword arguments by instantiating these objects via :py:func:`boto.connect_sdb`. :type region: :class:`boto.sdb.regioninfo.SDBRegionInfo` :keyword region: Explicitly specify a region. Defaults to ``us-east-1`` if not specified. You may also specify the region in your ``boto.cfg``: .. code-block:: cfg [SDB] region = eu-west-1 """ if not region: region_name = boto.config.get('SDB', 'region', self.DefaultRegionName) for reg in boto.sdb.regions(): if reg.name == region_name: region = reg break self.region = region AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, self.region.endpoint, debug, https_connection_factory, path, security_token=security_token) self.box_usage = 0.0 self.converter = converter self.item_cls = Item def _required_auth_capability(self): return ['sdb'] def set_item_cls(self, cls): """ While the default item class is :py:class:`boto.sdb.item.Item`, this default may be overridden. Use this method to change a connection's item class. :param object cls: The new class to set as this connection's item class. See the default item class for inspiration as to what your replacement should/could look like. """ self.item_cls = cls def _build_name_value_list(self, params, attributes, replace=False, label='Attribute'): keys = attributes.keys() keys.sort() i = 1 for key in keys: value = attributes[key] if isinstance(value, list): for v in value: params['%s.%d.Name' % (label, i)] = key if self.converter: v = self.converter.encode(v) params['%s.%d.Value' % (label, i)] = v if replace: params['%s.%d.Replace' % (label, i)] = 'true' i += 1 else: params['%s.%d.Name' % (label, i)] = key if self.converter: value = self.converter.encode(value) params['%s.%d.Value' % (label, i)] = value if replace: params['%s.%d.Replace' % (label, i)] = 'true' i += 1 def _build_expected_value(self, params, expected_value): params['Expected.1.Name'] = expected_value[0] if expected_value[1] is True: params['Expected.1.Exists'] = 'true' elif expected_value[1] is False: params['Expected.1.Exists'] = 'false' else: params['Expected.1.Value'] = expected_value[1] def _build_batch_list(self, params, items, replace=False): item_names = items.keys() i = 0 for item_name in item_names: params['Item.%d.ItemName' % i] = item_name j = 0 item = items[item_name] if item is not None: attr_names = item.keys() for attr_name in attr_names: value = item[attr_name] if isinstance(value, list): for v in value: if self.converter: v = self.converter.encode(v) params['Item.%d.Attribute.%d.Name' % (i, j)] = attr_name params['Item.%d.Attribute.%d.Value' % (i, j)] = v if replace: params['Item.%d.Attribute.%d.Replace' % (i, j)] = 'true' j += 1 else: params['Item.%d.Attribute.%d.Name' % (i, j)] = attr_name if self.converter: value = self.converter.encode(value) params['Item.%d.Attribute.%d.Value' % (i, j)] = value if replace: params['Item.%d.Attribute.%d.Replace' % (i, j)] = 'true' j += 1 i += 1 def _build_name_list(self, params, attribute_names): i = 1 attribute_names.sort() for name in attribute_names: params['Attribute.%d.Name' % i] = name i += 1 def get_usage(self): """ Returns the BoxUsage (in USD) accumulated on this specific SDBConnection instance. .. tip:: This can be out of date, and should only be treated as a rough estimate. Also note that this estimate only applies to the requests made on this specific connection instance. It is by no means an account-wide estimate. :rtype: float :return: The accumulated BoxUsage of all requests made on the connection. """ return self.box_usage def print_usage(self): """ Print the BoxUsage and approximate costs of all requests made on this specific SDBConnection instance. .. tip:: This can be out of date, and should only be treated as a rough estimate. Also note that this estimate only applies to the requests made on this specific connection instance. It is by no means an account-wide estimate. """ print 'Total Usage: %f compute seconds' % self.box_usage cost = self.box_usage * 0.14 print 'Approximate Cost: $%f' % cost def get_domain(self, domain_name, validate=True): """ Retrieves a :py:class:`boto.sdb.domain.Domain` object whose name matches ``domain_name``. :param str domain_name: The name of the domain to retrieve :keyword bool validate: When ``True``, check to see if the domain actually exists. If ``False``, blindly return a :py:class:`Domain ` object with the specified name set. :raises: :py:class:`boto.exception.SDBResponseError` if ``validate`` is ``True`` and no match could be found. :rtype: :py:class:`boto.sdb.domain.Domain` :return: The requested domain """ domain = Domain(self, domain_name) if validate: self.select(domain, """select * from `%s` limit 1""" % domain_name) return domain def lookup(self, domain_name, validate=True): """ Lookup an existing SimpleDB domain. This differs from :py:meth:`get_domain` in that ``None`` is returned if ``validate`` is ``True`` and no match was found (instead of raising an exception). :param str domain_name: The name of the domain to retrieve :param bool validate: If ``True``, a ``None`` value will be returned if the specified domain can't be found. If ``False``, a :py:class:`Domain ` object will be dumbly returned, regardless of whether it actually exists. :rtype: :class:`boto.sdb.domain.Domain` object or ``None`` :return: The Domain object or ``None`` if the domain does not exist. """ try: domain = self.get_domain(domain_name, validate) except: domain = None return domain def get_all_domains(self, max_domains=None, next_token=None): """ Returns a :py:class:`boto.resultset.ResultSet` containing all :py:class:`boto.sdb.domain.Domain` objects associated with this connection's Access Key ID. :keyword int max_domains: Limit the returned :py:class:`ResultSet ` to the specified number of members. :keyword str next_token: A token string that was returned in an earlier call to this method as the ``next_token`` attribute on the returned :py:class:`ResultSet ` object. This attribute is set if there are more than Domains than the value specified in the ``max_domains`` keyword. Pass the ``next_token`` value from you earlier query in this keyword to get the next 'page' of domains. """ params = {} if max_domains: params['MaxNumberOfDomains'] = max_domains if next_token: params['NextToken'] = next_token return self.get_list('ListDomains', params, [('DomainName', Domain)]) def create_domain(self, domain_name): """ Create a SimpleDB domain. :type domain_name: string :param domain_name: The name of the new domain :rtype: :class:`boto.sdb.domain.Domain` object :return: The newly created domain """ params = {'DomainName':domain_name} d = self.get_object('CreateDomain', params, Domain) d.name = domain_name return d def get_domain_and_name(self, domain_or_name): """ Given a ``str`` or :class:`boto.sdb.domain.Domain`, return a ``tuple`` with the following members (in order): * In instance of :class:`boto.sdb.domain.Domain` for the requested domain * The domain's name as a ``str`` :type domain_or_name: ``str`` or :class:`boto.sdb.domain.Domain` :param domain_or_name: The domain or domain name to get the domain and name for. :raises: :class:`boto.exception.SDBResponseError` when an invalid domain name is specified. :rtype: tuple :return: A ``tuple`` with contents outlined as per above. """ if (isinstance(domain_or_name, Domain)): return (domain_or_name, domain_or_name.name) else: return (self.get_domain(domain_or_name), domain_or_name) def delete_domain(self, domain_or_name): """ Delete a SimpleDB domain. .. caution:: This will delete the domain and all items within the domain. :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object. :param domain_or_name: Either the name of a domain or a Domain object :rtype: bool :return: True if successful """ domain, domain_name = self.get_domain_and_name(domain_or_name) params = {'DomainName':domain_name} return self.get_status('DeleteDomain', params) def domain_metadata(self, domain_or_name): """ Get the Metadata for a SimpleDB domain. :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object. :param domain_or_name: Either the name of a domain or a Domain object :rtype: :class:`boto.sdb.domain.DomainMetaData` object :return: The newly created domain metadata object """ domain, domain_name = self.get_domain_and_name(domain_or_name) params = {'DomainName':domain_name} d = self.get_object('DomainMetadata', params, DomainMetaData) d.domain = domain return d def put_attributes(self, domain_or_name, item_name, attributes, replace=True, expected_value=None): """ Store attributes for a given item in a domain. :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object. :param domain_or_name: Either the name of a domain or a Domain object :type item_name: string :param item_name: The name of the item whose attributes are being stored. :type attribute_names: dict or dict-like object :param attribute_names: The name/value pairs to store as attributes :type expected_value: list :param expected_value: If supplied, this is a list or tuple consisting of a single attribute name and expected value. The list can be of the form: * ['name', 'value'] In which case the call will first verify that the attribute "name" of this item has a value of "value". If it does, the delete will proceed, otherwise a ConditionalCheckFailed error will be returned. The list can also be of the form: * ['name', True|False] which will simply check for the existence (True) or non-existence (False) of the attribute. :type replace: bool :param replace: Whether the attribute values passed in will replace existing values or will be added as addition values. Defaults to True. :rtype: bool :return: True if successful """ domain, domain_name = self.get_domain_and_name(domain_or_name) params = {'DomainName' : domain_name, 'ItemName' : item_name} self._build_name_value_list(params, attributes, replace) if expected_value: self._build_expected_value(params, expected_value) return self.get_status('PutAttributes', params) def batch_put_attributes(self, domain_or_name, items, replace=True): """ Store attributes for multiple items in a domain. :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object. :param domain_or_name: Either the name of a domain or a Domain object :type items: dict or dict-like object :param items: A dictionary-like object. The keys of the dictionary are the item names and the values are themselves dictionaries of attribute names/values, exactly the same as the attribute_names parameter of the scalar put_attributes call. :type replace: bool :param replace: Whether the attribute values passed in will replace existing values or will be added as addition values. Defaults to True. :rtype: bool :return: True if successful """ domain, domain_name = self.get_domain_and_name(domain_or_name) params = {'DomainName' : domain_name} self._build_batch_list(params, items, replace) return self.get_status('BatchPutAttributes', params, verb='POST') def get_attributes(self, domain_or_name, item_name, attribute_names=None, consistent_read=False, item=None): """ Retrieve attributes for a given item in a domain. :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object. :param domain_or_name: Either the name of a domain or a Domain object :type item_name: string :param item_name: The name of the item whose attributes are being retrieved. :type attribute_names: string or list of strings :param attribute_names: An attribute name or list of attribute names. This parameter is optional. If not supplied, all attributes will be retrieved for the item. :type consistent_read: bool :param consistent_read: When set to true, ensures that the most recent data is returned. :type item: :class:`boto.sdb.item.Item` :keyword item: Instead of instantiating a new Item object, you may specify one to update. :rtype: :class:`boto.sdb.item.Item` :return: An Item with the requested attribute name/values set on it """ domain, domain_name = self.get_domain_and_name(domain_or_name) params = {'DomainName' : domain_name, 'ItemName' : item_name} if consistent_read: params['ConsistentRead'] = 'true' if attribute_names: if not isinstance(attribute_names, list): attribute_names = [attribute_names] self.build_list_params(params, attribute_names, 'AttributeName') response = self.make_request('GetAttributes', params) body = response.read() if response.status == 200: if item == None: item = self.item_cls(domain, item_name) h = handler.XmlHandler(item, self) xml.sax.parseString(body, h) return item else: raise SDBResponseError(response.status, response.reason, body) def delete_attributes(self, domain_or_name, item_name, attr_names=None, expected_value=None): """ Delete attributes from a given item in a domain. :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object. :param domain_or_name: Either the name of a domain or a Domain object :type item_name: string :param item_name: The name of the item whose attributes are being deleted. :type attributes: dict, list or :class:`boto.sdb.item.Item` :param attributes: Either a list containing attribute names which will cause all values associated with that attribute name to be deleted or a dict or Item containing the attribute names and keys and list of values to delete as the value. If no value is supplied, all attribute name/values for the item will be deleted. :type expected_value: list :param expected_value: If supplied, this is a list or tuple consisting of a single attribute name and expected value. The list can be of the form: * ['name', 'value'] In which case the call will first verify that the attribute "name" of this item has a value of "value". If it does, the delete will proceed, otherwise a ConditionalCheckFailed error will be returned. The list can also be of the form: * ['name', True|False] which will simply check for the existence (True) or non-existence (False) of the attribute. :rtype: bool :return: True if successful """ domain, domain_name = self.get_domain_and_name(domain_or_name) params = {'DomainName':domain_name, 'ItemName' : item_name} if attr_names: if isinstance(attr_names, list): self._build_name_list(params, attr_names) elif isinstance(attr_names, dict) or isinstance(attr_names, self.item_cls): self._build_name_value_list(params, attr_names) if expected_value: self._build_expected_value(params, expected_value) return self.get_status('DeleteAttributes', params) def batch_delete_attributes(self, domain_or_name, items): """ Delete multiple items in a domain. :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object. :param domain_or_name: Either the name of a domain or a Domain object :type items: dict or dict-like object :param items: A dictionary-like object. The keys of the dictionary are the item names and the values are either: * dictionaries of attribute names/values, exactly the same as the attribute_names parameter of the scalar put_attributes call. The attribute name/value pairs will only be deleted if they match the name/value pairs passed in. * None which means that all attributes associated with the item should be deleted. :return: True if successful """ domain, domain_name = self.get_domain_and_name(domain_or_name) params = {'DomainName' : domain_name} self._build_batch_list(params, items, False) return self.get_status('BatchDeleteAttributes', params, verb='POST') def select(self, domain_or_name, query='', next_token=None, consistent_read=False): """ Returns a set of Attributes for item names within domain_name that match the query. The query must be expressed in using the SELECT style syntax rather than the original SimpleDB query language. Even though the select request does not require a domain object, a domain object must be passed into this method so the Item objects returned can point to the appropriate domain. :type domain_or_name: string or :class:`boto.sdb.domain.Domain` object :param domain_or_name: Either the name of a domain or a Domain object :type query: string :param query: The SimpleDB query to be performed. :type consistent_read: bool :param consistent_read: When set to true, ensures that the most recent data is returned. :rtype: ResultSet :return: An iterator containing the results. """ domain, domain_name = self.get_domain_and_name(domain_or_name) params = {'SelectExpression' : query} if consistent_read: params['ConsistentRead'] = 'true' if next_token: params['NextToken'] = next_token try: return self.get_list('Select', params, [('Item', self.item_cls)], parent=domain) except SDBResponseError, e: e.body = "Query: %s\n%s" % (query, e.body) raise e ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/db/__init__.py ================================================ # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/db/blob.py ================================================ # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class Blob(object): """Blob object""" def __init__(self, value=None, file=None, id=None): self._file = file self.id = id self.value = value @property def file(self): from StringIO import StringIO if self._file: f = self._file else: f = StringIO(self.value) return f def __str__(self): return unicode(self).encode('utf-8') def __unicode__(self): if hasattr(self.file, "get_contents_as_string"): value = self.file.get_contents_as_string() else: value = self.file.getvalue() if isinstance(value, unicode): return value else: return value.decode('utf-8') def read(self): if hasattr(self.file, "get_contents_as_string"): return self.file.get_contents_as_string() else: return self.file.read() def readline(self): return self.file.readline() def next(self): return self.file.next() def __iter__(self): return iter(self.file) @property def size(self): if self._file: return self._file.size elif self.value: return len(self.value) else: return 0 ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/db/key.py ================================================ # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class Key(object): @classmethod def from_path(cls, *args, **kwds): raise NotImplementedError, "Paths are not currently supported" def __init__(self, encoded=None, obj=None): self.name = None if obj: self.id = obj.id self.kind = obj.kind() else: self.id = None self.kind = None def app(self): raise NotImplementedError, "Applications are not currently supported" def kind(self): return self.kind def id(self): return self.id def name(self): raise NotImplementedError, "Key Names are not currently supported" def id_or_name(self): return self.id def has_id_or_name(self): return self.id != None def parent(self): raise NotImplementedError, "Key parents are not currently supported" def __str__(self): return self.id_or_name() ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/db/manager/__init__.py ================================================ # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import boto def get_manager(cls): """ Returns the appropriate Manager class for a given Model class. It does this by looking in the boto config for a section like this:: [DB] db_type = SimpleDB db_user = db_passwd = db_name = my_domain [DB_TestBasic] db_type = SimpleDB db_user = db_passwd = db_name = basic_domain db_port = 1111 The values in the DB section are "generic values" that will be used if nothing more specific is found. You can also create a section for a specific Model class that gives the db info for that class. In the example above, TestBasic is a Model subclass. """ db_user = boto.config.get('DB', 'db_user', None) db_passwd = boto.config.get('DB', 'db_passwd', None) db_type = boto.config.get('DB', 'db_type', 'SimpleDB') db_name = boto.config.get('DB', 'db_name', None) db_table = boto.config.get('DB', 'db_table', None) db_host = boto.config.get('DB', 'db_host', "sdb.amazonaws.com") db_port = boto.config.getint('DB', 'db_port', 443) enable_ssl = boto.config.getbool('DB', 'enable_ssl', True) sql_dir = boto.config.get('DB', 'sql_dir', None) debug = boto.config.getint('DB', 'debug', 0) # first see if there is a fully qualified section name in the Boto config file module_name = cls.__module__.replace('.', '_') db_section = 'DB_' + module_name + '_' + cls.__name__ if not boto.config.has_section(db_section): db_section = 'DB_' + cls.__name__ if boto.config.has_section(db_section): db_user = boto.config.get(db_section, 'db_user', db_user) db_passwd = boto.config.get(db_section, 'db_passwd', db_passwd) db_type = boto.config.get(db_section, 'db_type', db_type) db_name = boto.config.get(db_section, 'db_name', db_name) db_table = boto.config.get(db_section, 'db_table', db_table) db_host = boto.config.get(db_section, 'db_host', db_host) db_port = boto.config.getint(db_section, 'db_port', db_port) enable_ssl = boto.config.getint(db_section, 'enable_ssl', enable_ssl) debug = boto.config.getint(db_section, 'debug', debug) elif hasattr(cls, "_db_name") and cls._db_name is not None: # More specific then the generic DB config is any _db_name class property db_name = cls._db_name elif hasattr(cls.__bases__[0], "_manager"): return cls.__bases__[0]._manager if db_type == 'SimpleDB': from sdbmanager import SDBManager return SDBManager(cls, db_name, db_user, db_passwd, db_host, db_port, db_table, sql_dir, enable_ssl) elif db_type == 'PostgreSQL': from pgmanager import PGManager if db_table: return PGManager(cls, db_name, db_user, db_passwd, db_host, db_port, db_table, sql_dir, enable_ssl) else: return None elif db_type == 'XML': from xmlmanager import XMLManager return XMLManager(cls, db_name, db_user, db_passwd, db_host, db_port, db_table, sql_dir, enable_ssl) else: raise ValueError, 'Unknown db_type: %s' % db_type ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/db/manager/pgmanager.py ================================================ # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.sdb.db.key import Key from boto.sdb.db.model import Model import psycopg2 import psycopg2.extensions import uuid import os import string from boto.exception import SDBPersistenceError psycopg2.extensions.register_type(psycopg2.extensions.UNICODE) class PGConverter: def __init__(self, manager): self.manager = manager self.type_map = {Key : (self.encode_reference, self.decode_reference), Model : (self.encode_reference, self.decode_reference)} def encode(self, type, value): if type in self.type_map: encode = self.type_map[type][0] return encode(value) return value def decode(self, type, value): if type in self.type_map: decode = self.type_map[type][1] return decode(value) return value def encode_prop(self, prop, value): if isinstance(value, list): if hasattr(prop, 'item_type'): s = "{" new_value = [] for v in value: item_type = getattr(prop, 'item_type') if Model in item_type.mro(): item_type = Model new_value.append('%s' % self.encode(item_type, v)) s += ','.join(new_value) s += "}" return s else: return value return self.encode(prop.data_type, value) def decode_prop(self, prop, value): if prop.data_type == list: if value != None: if not isinstance(value, list): value = [value] if hasattr(prop, 'item_type'): item_type = getattr(prop, "item_type") if Model in item_type.mro(): if item_type != self.manager.cls: return item_type._manager.decode_value(prop, value) else: item_type = Model return [self.decode(item_type, v) for v in value] return value elif hasattr(prop, 'reference_class'): ref_class = getattr(prop, 'reference_class') if ref_class != self.manager.cls: return ref_class._manager.decode_value(prop, value) else: return self.decode(prop.data_type, value) elif hasattr(prop, 'calculated_type'): calc_type = getattr(prop, 'calculated_type') return self.decode(calc_type, value) else: return self.decode(prop.data_type, value) def encode_reference(self, value): if isinstance(value, str) or isinstance(value, unicode): return value if value == None: return '' else: return value.id def decode_reference(self, value): if not value: return None try: return self.manager.get_object_from_id(value) except: raise ValueError, 'Unable to convert %s to Object' % value class PGManager(object): def __init__(self, cls, db_name, db_user, db_passwd, db_host, db_port, db_table, sql_dir, enable_ssl): self.cls = cls self.db_name = db_name self.db_user = db_user self.db_passwd = db_passwd self.db_host = db_host self.db_port = db_port self.db_table = db_table self.sql_dir = sql_dir self.in_transaction = False self.converter = PGConverter(self) self._connect() def _build_connect_string(self): cs = 'dbname=%s user=%s password=%s host=%s port=%d' return cs % (self.db_name, self.db_user, self.db_passwd, self.db_host, self.db_port) def _connect(self): self.connection = psycopg2.connect(self._build_connect_string()) self.connection.set_client_encoding('UTF8') self.cursor = self.connection.cursor() def _object_lister(self, cursor): try: for row in cursor: yield self._object_from_row(row, cursor.description) except StopIteration: cursor.close() raise StopIteration def _dict_from_row(self, row, description): d = {} for i in range(0, len(row)): d[description[i][0]] = row[i] return d def _object_from_row(self, row, description=None): if not description: description = self.cursor.description d = self._dict_from_row(row, description) obj = self.cls(d['id']) obj._manager = self obj._auto_update = False for prop in obj.properties(hidden=False): if prop.data_type != Key: v = self.decode_value(prop, d[prop.name]) v = prop.make_value_from_datastore(v) if hasattr(prop, 'calculated_type'): prop._set_direct(obj, v) elif not prop.empty(v): setattr(obj, prop.name, v) else: setattr(obj, prop.name, prop.default_value()) return obj def _build_insert_qs(self, obj, calculated): fields = [] values = [] templs = [] id_calculated = [p for p in calculated if p.name == 'id'] for prop in obj.properties(hidden=False): if prop not in calculated: value = prop.get_value_for_datastore(obj) if value != prop.default_value() or prop.required: value = self.encode_value(prop, value) values.append(value) fields.append('"%s"' % prop.name) templs.append('%s') qs = 'INSERT INTO "%s" (' % self.db_table if len(id_calculated) == 0: qs += '"id",' qs += ','.join(fields) qs += ") VALUES (" if len(id_calculated) == 0: qs += "'%s'," % obj.id qs += ','.join(templs) qs += ')' if calculated: qs += ' RETURNING ' calc_values = ['"%s"' % p.name for p in calculated] qs += ','.join(calc_values) qs += ';' return qs, values def _build_update_qs(self, obj, calculated): fields = [] values = [] for prop in obj.properties(hidden=False): if prop not in calculated: value = prop.get_value_for_datastore(obj) if value != prop.default_value() or prop.required: value = self.encode_value(prop, value) values.append(value) field = '"%s"=' % prop.name field += '%s' fields.append(field) qs = 'UPDATE "%s" SET ' % self.db_table qs += ','.join(fields) qs += """ WHERE "id" = '%s'""" % obj.id if calculated: qs += ' RETURNING ' calc_values = ['"%s"' % p.name for p in calculated] qs += ','.join(calc_values) qs += ';' return qs, values def _get_sql(self, mapping=None): print '_get_sql' sql = None if self.sql_dir: path = os.path.join(self.sql_dir, self.cls.__name__ + '.sql') print path if os.path.isfile(path): fp = open(path) sql = fp.read() fp.close() t = string.Template(sql) sql = t.safe_substitute(mapping) return sql def start_transaction(self): print 'start_transaction' self.in_transaction = True def end_transaction(self): print 'end_transaction' self.in_transaction = False self.commit() def commit(self): if not self.in_transaction: print '!!commit on %s' % self.db_table try: self.connection.commit() except psycopg2.ProgrammingError, err: self.connection.rollback() raise err def rollback(self): print '!!rollback on %s' % self.db_table self.connection.rollback() def delete_table(self): self.cursor.execute('DROP TABLE "%s";' % self.db_table) self.commit() def create_table(self, mapping=None): self.cursor.execute(self._get_sql(mapping)) self.commit() def encode_value(self, prop, value): return self.converter.encode_prop(prop, value) def decode_value(self, prop, value): return self.converter.decode_prop(prop, value) def execute_sql(self, query): self.cursor.execute(query, None) self.commit() def query_sql(self, query, vars=None): self.cursor.execute(query, vars) return self.cursor.fetchall() def lookup(self, cls, name, value): values = [] qs = 'SELECT * FROM "%s" WHERE ' % self.db_table found = False for property in cls.properties(hidden=False): if property.name == name: found = True value = self.encode_value(property, value) values.append(value) qs += "%s=" % name qs += "%s" if not found: raise SDBPersistenceError('%s is not a valid field' % name) qs += ';' print qs self.cursor.execute(qs, values) if self.cursor.rowcount == 1: row = self.cursor.fetchone() return self._object_from_row(row, self.cursor.description) elif self.cursor.rowcount == 0: raise KeyError, 'Object not found' else: raise LookupError, 'Multiple Objects Found' def query(self, cls, filters, limit=None, order_by=None): parts = [] qs = 'SELECT * FROM "%s"' % self.db_table if filters: qs += ' WHERE ' properties = cls.properties(hidden=False) for filter, value in filters: name, op = filter.strip().split() found = False for property in properties: if property.name == name: found = True value = self.encode_value(property, value) parts.append(""""%s"%s'%s'""" % (name, op, value)) if not found: raise SDBPersistenceError('%s is not a valid field' % name) qs += ','.join(parts) qs += ';' print qs cursor = self.connection.cursor() cursor.execute(qs) return self._object_lister(cursor) def get_property(self, prop, obj, name): qs = """SELECT "%s" FROM "%s" WHERE id='%s';""" % (name, self.db_table, obj.id) print qs self.cursor.execute(qs, None) if self.cursor.rowcount == 1: rs = self.cursor.fetchone() for prop in obj.properties(hidden=False): if prop.name == name: v = self.decode_value(prop, rs[0]) return v raise AttributeError, '%s not found' % name def set_property(self, prop, obj, name, value): pass value = self.encode_value(prop, value) qs = 'UPDATE "%s" SET ' % self.db_table qs += "%s='%s'" % (name, self.encode_value(prop, value)) qs += " WHERE id='%s'" % obj.id qs += ';' print qs self.cursor.execute(qs) self.commit() def get_object(self, cls, id): qs = """SELECT * FROM "%s" WHERE id='%s';""" % (self.db_table, id) self.cursor.execute(qs, None) if self.cursor.rowcount == 1: row = self.cursor.fetchone() return self._object_from_row(row, self.cursor.description) else: raise SDBPersistenceError('%s object with id=%s does not exist' % (cls.__name__, id)) def get_object_from_id(self, id): return self.get_object(self.cls, id) def _find_calculated_props(self, obj): return [p for p in obj.properties() if hasattr(p, 'calculated_type')] def save_object(self, obj, expected_value=None): obj._auto_update = False calculated = self._find_calculated_props(obj) if not obj.id: obj.id = str(uuid.uuid4()) qs, values = self._build_insert_qs(obj, calculated) else: qs, values = self._build_update_qs(obj, calculated) print qs self.cursor.execute(qs, values) if calculated: calc_values = self.cursor.fetchone() print calculated print calc_values for i in range(0, len(calculated)): prop = calculated[i] prop._set_direct(obj, calc_values[i]) self.commit() def delete_object(self, obj): qs = """DELETE FROM "%s" WHERE id='%s';""" % (self.db_table, obj.id) print qs self.cursor.execute(qs) self.commit() ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/db/manager/sdbmanager.py ================================================ # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import boto import re from boto.utils import find_class import uuid from boto.sdb.db.key import Key from boto.sdb.db.model import Model from boto.sdb.db.blob import Blob from boto.sdb.db.property import ListProperty, MapProperty from datetime import datetime, date, time from boto.exception import SDBPersistenceError, S3ResponseError ISO8601 = '%Y-%m-%dT%H:%M:%SZ' class TimeDecodeError(Exception): pass class SDBConverter(object): """ Responsible for converting base Python types to format compatible with underlying database. For SimpleDB, that means everything needs to be converted to a string when stored in SimpleDB and from a string when retrieved. To convert a value, pass it to the encode or decode method. The encode method will take a Python native value and convert to DB format. The decode method will take a DB format value and convert it to Python native format. To find the appropriate method to call, the generic encode/decode methods will look for the type-specific method by searching for a method called "encode_" or "decode_". """ def __init__(self, manager): self.manager = manager self.type_map = { bool : (self.encode_bool, self.decode_bool), int : (self.encode_int, self.decode_int), long : (self.encode_long, self.decode_long), float : (self.encode_float, self.decode_float), Model : (self.encode_reference, self.decode_reference), Key : (self.encode_reference, self.decode_reference), datetime : (self.encode_datetime, self.decode_datetime), date : (self.encode_date, self.decode_date), time : (self.encode_time, self.decode_time), Blob: (self.encode_blob, self.decode_blob), str: (self.encode_string, self.decode_string), } def encode(self, item_type, value): try: if Model in item_type.mro(): item_type = Model except: pass if item_type in self.type_map: encode = self.type_map[item_type][0] return encode(value) return value def decode(self, item_type, value): if item_type in self.type_map: decode = self.type_map[item_type][1] return decode(value) return value def encode_list(self, prop, value): if value in (None, []): return [] if not isinstance(value, list): # This is a little trick to avoid encoding when it's just a single value, # since that most likely means it's from a query item_type = getattr(prop, "item_type") return self.encode(item_type, value) # Just enumerate(value) won't work here because # we need to add in some zero padding # We support lists up to 1,000 attributes, since # SDB technically only supports 1024 attributes anyway values = {} for k,v in enumerate(value): values["%03d" % k] = v return self.encode_map(prop, values) def encode_map(self, prop, value): import urllib if value == None: return None if not isinstance(value, dict): raise ValueError, 'Expected a dict value, got %s' % type(value) new_value = [] for key in value: item_type = getattr(prop, "item_type") if Model in item_type.mro(): item_type = Model encoded_value = self.encode(item_type, value[key]) if encoded_value != None: new_value.append('%s:%s' % (urllib.quote(key), encoded_value)) return new_value def encode_prop(self, prop, value): if isinstance(prop, ListProperty): return self.encode_list(prop, value) elif isinstance(prop, MapProperty): return self.encode_map(prop, value) else: return self.encode(prop.data_type, value) def decode_list(self, prop, value): if not isinstance(value, list): value = [value] if hasattr(prop, 'item_type'): item_type = getattr(prop, "item_type") dec_val = {} for val in value: if val != None: k,v = self.decode_map_element(item_type, val) try: k = int(k) except: k = v dec_val[k] = v value = dec_val.values() return value def decode_map(self, prop, value): if not isinstance(value, list): value = [value] ret_value = {} item_type = getattr(prop, "item_type") for val in value: k,v = self.decode_map_element(item_type, val) ret_value[k] = v return ret_value def decode_map_element(self, item_type, value): """Decode a single element for a map""" import urllib key = value if ":" in value: key, value = value.split(':',1) key = urllib.unquote(key) if Model in item_type.mro(): value = item_type(id=value) else: value = self.decode(item_type, value) return (key, value) def decode_prop(self, prop, value): if isinstance(prop, ListProperty): return self.decode_list(prop, value) elif isinstance(prop, MapProperty): return self.decode_map(prop, value) else: return self.decode(prop.data_type, value) def encode_int(self, value): value = int(value) value += 2147483648 return '%010d' % value def decode_int(self, value): try: value = int(value) except: boto.log.error("Error, %s is not an integer" % value) value = 0 value = int(value) value -= 2147483648 return int(value) def encode_long(self, value): value = long(value) value += 9223372036854775808 return '%020d' % value def decode_long(self, value): value = long(value) value -= 9223372036854775808 return value def encode_bool(self, value): if value == True or str(value).lower() in ("true", "yes"): return 'true' else: return 'false' def decode_bool(self, value): if value.lower() == 'true': return True else: return False def encode_float(self, value): """ See http://tools.ietf.org/html/draft-wood-ldapext-float-00. """ s = '%e' % value l = s.split('e') mantissa = l[0].ljust(18, '0') exponent = l[1] if value == 0.0: case = '3' exponent = '000' elif mantissa[0] != '-' and exponent[0] == '+': case = '5' exponent = exponent[1:].rjust(3, '0') elif mantissa[0] != '-' and exponent[0] == '-': case = '4' exponent = 999 + int(exponent) exponent = '%03d' % exponent elif mantissa[0] == '-' and exponent[0] == '-': case = '2' mantissa = '%f' % (10 + float(mantissa)) mantissa = mantissa.ljust(18, '0') exponent = exponent[1:].rjust(3, '0') else: case = '1' mantissa = '%f' % (10 + float(mantissa)) mantissa = mantissa.ljust(18, '0') exponent = 999 - int(exponent) exponent = '%03d' % exponent return '%s %s %s' % (case, exponent, mantissa) def decode_float(self, value): case = value[0] exponent = value[2:5] mantissa = value[6:] if case == '3': return 0.0 elif case == '5': pass elif case == '4': exponent = '%03d' % (int(exponent) - 999) elif case == '2': mantissa = '%f' % (float(mantissa) - 10) exponent = '-' + exponent else: mantissa = '%f' % (float(mantissa) - 10) exponent = '%03d' % abs((int(exponent) - 999)) return float(mantissa + 'e' + exponent) def encode_datetime(self, value): if isinstance(value, str) or isinstance(value, unicode): return value return value.strftime(ISO8601) def decode_datetime(self, value): try: return datetime.strptime(value, ISO8601) except: return None def encode_date(self, value): if isinstance(value, str) or isinstance(value, unicode): return value return value.isoformat() def decode_date(self, value): try: value = value.split("-") return date(int(value[0]), int(value[1]), int(value[2])) except: return None encode_time = encode_date def decode_time(self, value): """ converts strings in the form of HH:MM:SS.mmmmmm (created by datetime.time.isoformat()) to datetime.time objects. Timzone-aware strings ("HH:MM:SS.mmmmmm+HH:MM") won't be handled right now and will raise TimeDecodeError. """ if '-' in value or '+' in value: # TODO: Handle tzinfo raise TimeDecodeError("Can't handle timezone aware objects: %r" % value) tmp = value.split('.') arg = map(int, tmp[0].split(':')) if len(tmp) == 2: arg.append(int(tmp[1])) return time(*arg) def encode_reference(self, value): if value in (None, 'None', '', ' '): return None if isinstance(value, str) or isinstance(value, unicode): return value else: return value.id def decode_reference(self, value): if not value or value == "None": return None return value def encode_blob(self, value): if not value: return None if isinstance(value, str): return value if not value.id: bucket = self.manager.get_blob_bucket() key = bucket.new_key(str(uuid.uuid4())) value.id = "s3://%s/%s" % (key.bucket.name, key.name) else: match = re.match("^s3:\/\/([^\/]*)\/(.*)$", value.id) if match: s3 = self.manager.get_s3_connection() bucket = s3.get_bucket(match.group(1), validate=False) key = bucket.get_key(match.group(2)) else: raise SDBPersistenceError("Invalid Blob ID: %s" % value.id) if value.value != None: key.set_contents_from_string(value.value) return value.id def decode_blob(self, value): if not value: return None match = re.match("^s3:\/\/([^\/]*)\/(.*)$", value) if match: s3 = self.manager.get_s3_connection() bucket = s3.get_bucket(match.group(1), validate=False) try: key = bucket.get_key(match.group(2)) except S3ResponseError, e: if e.reason != "Forbidden": raise return None else: return None if key: return Blob(file=key, id="s3://%s/%s" % (key.bucket.name, key.name)) else: return None def encode_string(self, value): """Convert ASCII, Latin-1 or UTF-8 to pure Unicode""" if not isinstance(value, str): return value try: return unicode(value, 'utf-8') except: # really, this should throw an exception. # in the interest of not breaking current # systems, however: arr = [] for ch in value: arr.append(unichr(ord(ch))) return u"".join(arr) def decode_string(self, value): """Decoding a string is really nothing, just return the value as-is""" return value class SDBManager(object): def __init__(self, cls, db_name, db_user, db_passwd, db_host, db_port, db_table, ddl_dir, enable_ssl, consistent=None): self.cls = cls self.db_name = db_name self.db_user = db_user self.db_passwd = db_passwd self.db_host = db_host self.db_port = db_port self.db_table = db_table self.ddl_dir = ddl_dir self.enable_ssl = enable_ssl self.s3 = None self.bucket = None self.converter = SDBConverter(self) self._sdb = None self._domain = None if consistent == None and hasattr(cls, "__consistent__"): consistent = cls.__consistent__ self.consistent = consistent @property def sdb(self): if self._sdb is None: self._connect() return self._sdb @property def domain(self): if self._domain is None: self._connect() return self._domain def _connect(self): args = dict(aws_access_key_id=self.db_user, aws_secret_access_key=self.db_passwd, is_secure=self.enable_ssl) try: region = [x for x in boto.sdb.regions() if x.endpoint == self.db_host][0] args['region'] = region except IndexError: pass self._sdb = boto.connect_sdb(**args) # This assumes that the domain has already been created # It's much more efficient to do it this way rather than # having this make a roundtrip each time to validate. # The downside is that if the domain doesn't exist, it breaks self._domain = self._sdb.lookup(self.db_name, validate=False) if not self._domain: self._domain = self._sdb.create_domain(self.db_name) def _object_lister(self, cls, query_lister): for item in query_lister: obj = self.get_object(cls, item.name, item) if obj: yield obj def encode_value(self, prop, value): if value == None: return None if not prop: return str(value) return self.converter.encode_prop(prop, value) def decode_value(self, prop, value): return self.converter.decode_prop(prop, value) def get_s3_connection(self): if not self.s3: self.s3 = boto.connect_s3(self.db_user, self.db_passwd) return self.s3 def get_blob_bucket(self, bucket_name=None): s3 = self.get_s3_connection() bucket_name = "%s-%s" % (s3.aws_access_key_id, self.domain.name) bucket_name = bucket_name.lower() try: self.bucket = s3.get_bucket(bucket_name) except: self.bucket = s3.create_bucket(bucket_name) return self.bucket def load_object(self, obj): if not obj._loaded: a = self.domain.get_attributes(obj.id,consistent_read=self.consistent) if a.has_key('__type__'): for prop in obj.properties(hidden=False): if a.has_key(prop.name): value = self.decode_value(prop, a[prop.name]) value = prop.make_value_from_datastore(value) try: setattr(obj, prop.name, value) except Exception, e: boto.log.exception(e) obj._loaded = True def get_object(self, cls, id, a=None): obj = None if not a: a = self.domain.get_attributes(id,consistent_read=self.consistent) if a.has_key('__type__'): if not cls or a['__type__'] != cls.__name__: cls = find_class(a['__module__'], a['__type__']) if cls: params = {} for prop in cls.properties(hidden=False): if a.has_key(prop.name): value = self.decode_value(prop, a[prop.name]) value = prop.make_value_from_datastore(value) params[prop.name] = value obj = cls(id, **params) obj._loaded = True else: s = '(%s) class %s.%s not found' % (id, a['__module__'], a['__type__']) boto.log.info('sdbmanager: %s' % s) return obj def get_object_from_id(self, id): return self.get_object(None, id) def query(self, query): query_str = "select * from `%s` %s" % (self.domain.name, self._build_filter_part(query.model_class, query.filters, query.sort_by, query.select)) if query.limit: query_str += " limit %s" % query.limit rs = self.domain.select(query_str, max_items=query.limit, next_token = query.next_token) query.rs = rs return self._object_lister(query.model_class, rs) def count(self, cls, filters, quick=True, sort_by=None, select=None): """ Get the number of results that would be returned in this query """ query = "select count(*) from `%s` %s" % (self.domain.name, self._build_filter_part(cls, filters, sort_by, select)) count = 0 for row in self.domain.select(query): count += int(row['Count']) if quick: return count return count def _build_filter(self, property, name, op, val): if name == "__id__": name = 'itemName()' if name != "itemName()": name = '`%s`' % name if val == None: if op in ('is','='): return "%(name)s is null" % {"name": name} elif op in ('is not', '!='): return "%s is not null" % name else: val = "" if property.__class__ == ListProperty: if op in ("is", "="): op = "like" elif op in ("!=", "not"): op = "not like" if not(op in ["like", "not like"] and val.startswith("%")): val = "%%:%s" % val return "%s %s '%s'" % (name, op, val.replace("'", "''")) def _build_filter_part(self, cls, filters, order_by=None, select=None): """ Build the filter part """ import types query_parts = [] order_by_filtered = False if order_by: if order_by[0] == "-": order_by_method = "DESC"; order_by = order_by[1:] else: order_by_method = "ASC"; if select: if order_by and order_by in select: order_by_filtered = True query_parts.append("(%s)" % select) if isinstance(filters, str) or isinstance(filters, unicode): query = "WHERE %s AND `__type__` = '%s'" % (filters, cls.__name__) if order_by in ["__id__", "itemName()"]: query += " ORDER BY itemName() %s" % order_by_method elif order_by != None: query += " ORDER BY `%s` %s" % (order_by, order_by_method) return query for filter in filters: filter_parts = [] filter_props = filter[0] if type(filter_props) != list: filter_props = [filter_props] for filter_prop in filter_props: (name, op) = filter_prop.strip().split(" ", 1) value = filter[1] property = cls.find_property(name) if name == order_by: order_by_filtered = True if types.TypeType(value) == types.ListType: filter_parts_sub = [] for val in value: val = self.encode_value(property, val) if isinstance(val, list): for v in val: filter_parts_sub.append(self._build_filter(property, name, op, v)) else: filter_parts_sub.append(self._build_filter(property, name, op, val)) filter_parts.append("(%s)" % (" OR ".join(filter_parts_sub))) else: val = self.encode_value(property, value) if isinstance(val, list): for v in val: filter_parts.append(self._build_filter(property, name, op, v)) else: filter_parts.append(self._build_filter(property, name, op, val)) query_parts.append("(%s)" % (" or ".join(filter_parts))) type_query = "(`__type__` = '%s'" % cls.__name__ for subclass in self._get_all_decendents(cls).keys(): type_query += " or `__type__` = '%s'" % subclass type_query +=")" query_parts.append(type_query) order_by_query = "" if order_by: if not order_by_filtered: query_parts.append("`%s` LIKE '%%'" % order_by) if order_by in ["__id__", "itemName()"]: order_by_query = " ORDER BY itemName() %s" % order_by_method else: order_by_query = " ORDER BY `%s` %s" % (order_by, order_by_method) if len(query_parts) > 0: return "WHERE %s %s" % (" AND ".join(query_parts), order_by_query) else: return "" def _get_all_decendents(self, cls): """Get all decendents for a given class""" decendents = {} for sc in cls.__sub_classes__: decendents[sc.__name__] = sc decendents.update(self._get_all_decendents(sc)) return decendents def query_gql(self, query_string, *args, **kwds): raise NotImplementedError, "GQL queries not supported in SimpleDB" def save_object(self, obj, expected_value=None): if not obj.id: obj.id = str(uuid.uuid4()) attrs = {'__type__' : obj.__class__.__name__, '__module__' : obj.__class__.__module__, '__lineage__' : obj.get_lineage()} del_attrs = [] for property in obj.properties(hidden=False): value = property.get_value_for_datastore(obj) if value is not None: value = self.encode_value(property, value) if value == []: value = None if value == None: del_attrs.append(property.name) continue attrs[property.name] = value if property.unique: try: args = {property.name: value} obj2 = obj.find(**args).next() if obj2.id != obj.id: raise SDBPersistenceError("Error: %s must be unique!" % property.name) except(StopIteration): pass # Convert the Expected value to SDB format if expected_value: prop = obj.find_property(expected_value[0]) v = expected_value[1] if v is not None and not type(v) == bool: v = self.encode_value(prop, v) expected_value[1] = v self.domain.put_attributes(obj.id, attrs, replace=True, expected_value=expected_value) if len(del_attrs) > 0: self.domain.delete_attributes(obj.id, del_attrs) return obj def delete_object(self, obj): self.domain.delete_attributes(obj.id) def set_property(self, prop, obj, name, value): setattr(obj, name, value) value = prop.get_value_for_datastore(obj) value = self.encode_value(prop, value) if prop.unique: try: args = {prop.name: value} obj2 = obj.find(**args).next() if obj2.id != obj.id: raise SDBPersistenceError("Error: %s must be unique!" % prop.name) except(StopIteration): pass self.domain.put_attributes(obj.id, {name : value}, replace=True) def get_property(self, prop, obj, name): a = self.domain.get_attributes(obj.id,consistent_read=self.consistent) # try to get the attribute value from SDB if name in a: value = self.decode_value(prop, a[name]) value = prop.make_value_from_datastore(value) setattr(obj, prop.name, value) return value raise AttributeError, '%s not found' % name def set_key_value(self, obj, name, value): self.domain.put_attributes(obj.id, {name : value}, replace=True) def delete_key_value(self, obj, name): self.domain.delete_attributes(obj.id, name) def get_key_value(self, obj, name): a = self.domain.get_attributes(obj.id, name,consistent_read=self.consistent) if a.has_key(name): return a[name] else: return None def get_raw_item(self, obj): return self.domain.get_item(obj.id) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/db/manager/xmlmanager.py ================================================ # Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import boto from boto.utils import find_class, Password from boto.sdb.db.key import Key from boto.sdb.db.model import Model from datetime import datetime from xml.dom.minidom import getDOMImplementation, parse, parseString, Node ISO8601 = '%Y-%m-%dT%H:%M:%SZ' class XMLConverter: """ Responsible for converting base Python types to format compatible with underlying database. For SimpleDB, that means everything needs to be converted to a string when stored in SimpleDB and from a string when retrieved. To convert a value, pass it to the encode or decode method. The encode method will take a Python native value and convert to DB format. The decode method will take a DB format value and convert it to Python native format. To find the appropriate method to call, the generic encode/decode methods will look for the type-specific method by searching for a method called "encode_" or "decode_". """ def __init__(self, manager): self.manager = manager self.type_map = { bool : (self.encode_bool, self.decode_bool), int : (self.encode_int, self.decode_int), long : (self.encode_long, self.decode_long), Model : (self.encode_reference, self.decode_reference), Key : (self.encode_reference, self.decode_reference), Password : (self.encode_password, self.decode_password), datetime : (self.encode_datetime, self.decode_datetime)} def get_text_value(self, parent_node): value = '' for node in parent_node.childNodes: if node.nodeType == node.TEXT_NODE: value += node.data return value def encode(self, item_type, value): if item_type in self.type_map: encode = self.type_map[item_type][0] return encode(value) return value def decode(self, item_type, value): if item_type in self.type_map: decode = self.type_map[item_type][1] return decode(value) else: value = self.get_text_value(value) return value def encode_prop(self, prop, value): if isinstance(value, list): if hasattr(prop, 'item_type'): new_value = [] for v in value: item_type = getattr(prop, "item_type") if Model in item_type.mro(): item_type = Model new_value.append(self.encode(item_type, v)) return new_value else: return value else: return self.encode(prop.data_type, value) def decode_prop(self, prop, value): if prop.data_type == list: if hasattr(prop, 'item_type'): item_type = getattr(prop, "item_type") if Model in item_type.mro(): item_type = Model values = [] for item_node in value.getElementsByTagName('item'): value = self.decode(item_type, item_node) values.append(value) return values else: return self.get_text_value(value) else: return self.decode(prop.data_type, value) def encode_int(self, value): value = int(value) return '%d' % value def decode_int(self, value): value = self.get_text_value(value) if value: value = int(value) else: value = None return value def encode_long(self, value): value = long(value) return '%d' % value def decode_long(self, value): value = self.get_text_value(value) return long(value) def encode_bool(self, value): if value == True: return 'true' else: return 'false' def decode_bool(self, value): value = self.get_text_value(value) if value.lower() == 'true': return True else: return False def encode_datetime(self, value): return value.strftime(ISO8601) def decode_datetime(self, value): value = self.get_text_value(value) try: return datetime.strptime(value, ISO8601) except: return None def encode_reference(self, value): if isinstance(value, str) or isinstance(value, unicode): return value if value == None: return '' else: val_node = self.manager.doc.createElement("object") val_node.setAttribute('id', value.id) val_node.setAttribute('class', '%s.%s' % (value.__class__.__module__, value.__class__.__name__)) return val_node def decode_reference(self, value): if not value: return None try: value = value.childNodes[0] class_name = value.getAttribute("class") id = value.getAttribute("id") cls = find_class(class_name) return cls.get_by_ids(id) except: return None def encode_password(self, value): if value and len(value) > 0: return str(value) else: return None def decode_password(self, value): value = self.get_text_value(value) return Password(value) class XMLManager(object): def __init__(self, cls, db_name, db_user, db_passwd, db_host, db_port, db_table, ddl_dir, enable_ssl): self.cls = cls if not db_name: db_name = cls.__name__.lower() self.db_name = db_name self.db_user = db_user self.db_passwd = db_passwd self.db_host = db_host self.db_port = db_port self.db_table = db_table self.ddl_dir = ddl_dir self.s3 = None self.converter = XMLConverter(self) self.impl = getDOMImplementation() self.doc = self.impl.createDocument(None, 'objects', None) self.connection = None self.enable_ssl = enable_ssl self.auth_header = None if self.db_user: import base64 base64string = base64.encodestring('%s:%s' % (self.db_user, self.db_passwd))[:-1] authheader = "Basic %s" % base64string self.auth_header = authheader def _connect(self): if self.db_host: if self.enable_ssl: from httplib import HTTPSConnection as Connection else: from httplib import HTTPConnection as Connection self.connection = Connection(self.db_host, self.db_port) def _make_request(self, method, url, post_data=None, body=None): """ Make a request on this connection """ if not self.connection: self._connect() try: self.connection.close() except: pass self.connection.connect() headers = {} if self.auth_header: headers["Authorization"] = self.auth_header self.connection.request(method, url, body, headers) resp = self.connection.getresponse() return resp def new_doc(self): return self.impl.createDocument(None, 'objects', None) def _object_lister(self, cls, doc): for obj_node in doc.getElementsByTagName('object'): if not cls: class_name = obj_node.getAttribute('class') cls = find_class(class_name) id = obj_node.getAttribute('id') obj = cls(id) for prop_node in obj_node.getElementsByTagName('property'): prop_name = prop_node.getAttribute('name') prop = obj.find_property(prop_name) if prop: if hasattr(prop, 'item_type'): value = self.get_list(prop_node, prop.item_type) else: value = self.decode_value(prop, prop_node) value = prop.make_value_from_datastore(value) setattr(obj, prop.name, value) yield obj def reset(self): self._connect() def get_doc(self): return self.doc def encode_value(self, prop, value): return self.converter.encode_prop(prop, value) def decode_value(self, prop, value): return self.converter.decode_prop(prop, value) def get_s3_connection(self): if not self.s3: self.s3 = boto.connect_s3(self.aws_access_key_id, self.aws_secret_access_key) return self.s3 def get_list(self, prop_node, item_type): values = [] try: items_node = prop_node.getElementsByTagName('items')[0] except: return [] for item_node in items_node.getElementsByTagName('item'): value = self.converter.decode(item_type, item_node) values.append(value) return values def get_object_from_doc(self, cls, id, doc): obj_node = doc.getElementsByTagName('object')[0] if not cls: class_name = obj_node.getAttribute('class') cls = find_class(class_name) if not id: id = obj_node.getAttribute('id') obj = cls(id) for prop_node in obj_node.getElementsByTagName('property'): prop_name = prop_node.getAttribute('name') prop = obj.find_property(prop_name) value = self.decode_value(prop, prop_node) value = prop.make_value_from_datastore(value) if value != None: try: setattr(obj, prop.name, value) except: pass return obj def get_props_from_doc(self, cls, id, doc): """ Pull out the properties from this document Returns the class, the properties in a hash, and the id if provided as a tuple :return: (cls, props, id) """ obj_node = doc.getElementsByTagName('object')[0] if not cls: class_name = obj_node.getAttribute('class') cls = find_class(class_name) if not id: id = obj_node.getAttribute('id') props = {} for prop_node in obj_node.getElementsByTagName('property'): prop_name = prop_node.getAttribute('name') prop = cls.find_property(prop_name) value = self.decode_value(prop, prop_node) value = prop.make_value_from_datastore(value) if value != None: props[prop.name] = value return (cls, props, id) def get_object(self, cls, id): if not self.connection: self._connect() if not self.connection: raise NotImplementedError("Can't query without a database connection") url = "/%s/%s" % (self.db_name, id) resp = self._make_request('GET', url) if resp.status == 200: doc = parse(resp) else: raise Exception("Error: %s" % resp.status) return self.get_object_from_doc(cls, id, doc) def query(self, cls, filters, limit=None, order_by=None): if not self.connection: self._connect() if not self.connection: raise NotImplementedError("Can't query without a database connection") from urllib import urlencode query = str(self._build_query(cls, filters, limit, order_by)) if query: url = "/%s?%s" % (self.db_name, urlencode({"query": query})) else: url = "/%s" % self.db_name resp = self._make_request('GET', url) if resp.status == 200: doc = parse(resp) else: raise Exception("Error: %s" % resp.status) return self._object_lister(cls, doc) def _build_query(self, cls, filters, limit, order_by): import types if len(filters) > 4: raise Exception('Too many filters, max is 4') parts = [] properties = cls.properties(hidden=False) for filter, value in filters: name, op = filter.strip().split() found = False for property in properties: if property.name == name: found = True if types.TypeType(value) == types.ListType: filter_parts = [] for val in value: val = self.encode_value(property, val) filter_parts.append("'%s' %s '%s'" % (name, op, val)) parts.append("[%s]" % " OR ".join(filter_parts)) else: value = self.encode_value(property, value) parts.append("['%s' %s '%s']" % (name, op, value)) if not found: raise Exception('%s is not a valid field' % name) if order_by: if order_by.startswith("-"): key = order_by[1:] type = "desc" else: key = order_by type = "asc" parts.append("['%s' starts-with ''] sort '%s' %s" % (key, key, type)) return ' intersection '.join(parts) def query_gql(self, query_string, *args, **kwds): raise NotImplementedError, "GQL queries not supported in XML" def save_list(self, doc, items, prop_node): items_node = doc.createElement('items') prop_node.appendChild(items_node) for item in items: item_node = doc.createElement('item') items_node.appendChild(item_node) if isinstance(item, Node): item_node.appendChild(item) else: text_node = doc.createTextNode(item) item_node.appendChild(text_node) def save_object(self, obj, expected_value=None): """ Marshal the object and do a PUT """ doc = self.marshal_object(obj) if obj.id: url = "/%s/%s" % (self.db_name, obj.id) else: url = "/%s" % (self.db_name) resp = self._make_request("PUT", url, body=doc.toxml()) new_obj = self.get_object_from_doc(obj.__class__, None, parse(resp)) obj.id = new_obj.id for prop in obj.properties(): try: propname = prop.name except AttributeError: propname = None if propname: value = getattr(new_obj, prop.name) if value: setattr(obj, prop.name, value) return obj def marshal_object(self, obj, doc=None): if not doc: doc = self.new_doc() if not doc: doc = self.doc obj_node = doc.createElement('object') if obj.id: obj_node.setAttribute('id', obj.id) obj_node.setAttribute('class', '%s.%s' % (obj.__class__.__module__, obj.__class__.__name__)) root = doc.documentElement root.appendChild(obj_node) for property in obj.properties(hidden=False): prop_node = doc.createElement('property') prop_node.setAttribute('name', property.name) prop_node.setAttribute('type', property.type_name) value = property.get_value_for_datastore(obj) if value is not None: value = self.encode_value(property, value) if isinstance(value, list): self.save_list(doc, value, prop_node) elif isinstance(value, Node): prop_node.appendChild(value) else: text_node = doc.createTextNode(unicode(value).encode("ascii", "ignore")) prop_node.appendChild(text_node) obj_node.appendChild(prop_node) return doc def unmarshal_object(self, fp, cls=None, id=None): if isinstance(fp, str) or isinstance(fp, unicode): doc = parseString(fp) else: doc = parse(fp) return self.get_object_from_doc(cls, id, doc) def unmarshal_props(self, fp, cls=None, id=None): """ Same as unmarshalling an object, except it returns from "get_props_from_doc" """ if isinstance(fp, str) or isinstance(fp, unicode): doc = parseString(fp) else: doc = parse(fp) return self.get_props_from_doc(cls, id, doc) def delete_object(self, obj): url = "/%s/%s" % (self.db_name, obj.id) return self._make_request("DELETE", url) def set_key_value(self, obj, name, value): self.domain.put_attributes(obj.id, {name : value}, replace=True) def delete_key_value(self, obj, name): self.domain.delete_attributes(obj.id, name) def get_key_value(self, obj, name): a = self.domain.get_attributes(obj.id, name) if a.has_key(name): return a[name] else: return None def get_raw_item(self, obj): return self.domain.get_item(obj.id) def set_property(self, prop, obj, name, value): pass def get_property(self, prop, obj, name): pass def load_object(self, obj): if not obj._loaded: obj = obj.get_by_id(obj.id) obj._loaded = True return obj ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/db/model.py ================================================ # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.sdb.db.manager import get_manager from boto.sdb.db.property import Property from boto.sdb.db.key import Key from boto.sdb.db.query import Query import boto class ModelMeta(type): "Metaclass for all Models" def __init__(cls, name, bases, dict): super(ModelMeta, cls).__init__(name, bases, dict) # Make sure this is a subclass of Model - mainly copied from django ModelBase (thanks!) cls.__sub_classes__ = [] try: if filter(lambda b: issubclass(b, Model), bases): for base in bases: base.__sub_classes__.append(cls) cls._manager = get_manager(cls) # look for all of the Properties and set their names for key in dict.keys(): if isinstance(dict[key], Property): property = dict[key] property.__property_config__(cls, key) prop_names = [] props = cls.properties() for prop in props: if not prop.__class__.__name__.startswith('_'): prop_names.append(prop.name) setattr(cls, '_prop_names', prop_names) except NameError: # 'Model' isn't defined yet, meaning we're looking at our own # Model class, defined below. pass class Model(object): __metaclass__ = ModelMeta __consistent__ = False # Consistent is set off by default id = None @classmethod def get_lineage(cls): l = [c.__name__ for c in cls.mro()] l.reverse() return '.'.join(l) @classmethod def kind(cls): return cls.__name__ @classmethod def _get_by_id(cls, id, manager=None): if not manager: manager = cls._manager return manager.get_object(cls, id) @classmethod def get_by_id(cls, ids=None, parent=None): if isinstance(ids, list): objs = [cls._get_by_id(id) for id in ids] return objs else: return cls._get_by_id(ids) get_by_ids = get_by_id @classmethod def get_by_key_name(cls, key_names, parent=None): raise NotImplementedError, "Key Names are not currently supported" @classmethod def find(cls, limit=None, next_token=None, **params): q = Query(cls, limit=limit, next_token=next_token) for key, value in params.items(): q.filter('%s =' % key, value) return q @classmethod def all(cls, limit=None, next_token=None): return cls.find(limit=limit, next_token=next_token) @classmethod def get_or_insert(key_name, **kw): raise NotImplementedError, "get_or_insert not currently supported" @classmethod def properties(cls, hidden=True): properties = [] while cls: for key in cls.__dict__.keys(): prop = cls.__dict__[key] if isinstance(prop, Property): if hidden or not prop.__class__.__name__.startswith('_'): properties.append(prop) if len(cls.__bases__) > 0: cls = cls.__bases__[0] else: cls = None return properties @classmethod def find_property(cls, prop_name): property = None while cls: for key in cls.__dict__.keys(): prop = cls.__dict__[key] if isinstance(prop, Property): if not prop.__class__.__name__.startswith('_') and prop_name == prop.name: property = prop if len(cls.__bases__) > 0: cls = cls.__bases__[0] else: cls = None return property @classmethod def get_xmlmanager(cls): if not hasattr(cls, '_xmlmanager'): from boto.sdb.db.manager.xmlmanager import XMLManager cls._xmlmanager = XMLManager(cls, None, None, None, None, None, None, None, False) return cls._xmlmanager @classmethod def from_xml(cls, fp): xmlmanager = cls.get_xmlmanager() return xmlmanager.unmarshal_object(fp) def __init__(self, id=None, **kw): self._loaded = False # first try to initialize all properties to their default values for prop in self.properties(hidden=False): try: setattr(self, prop.name, prop.default_value()) except ValueError: pass if kw.has_key('manager'): self._manager = kw['manager'] self.id = id for key in kw: if key != 'manager': # We don't want any errors populating up when loading an object, # so if it fails we just revert to it's default value try: setattr(self, key, kw[key]) except Exception, e: boto.log.exception(e) def __repr__(self): return '%s<%s>' % (self.__class__.__name__, self.id) def __str__(self): return str(self.id) def __eq__(self, other): return other and isinstance(other, Model) and self.id == other.id def _get_raw_item(self): return self._manager.get_raw_item(self) def load(self): if self.id and not self._loaded: self._manager.load_object(self) def reload(self): if self.id: self._loaded = False self._manager.load_object(self) def put(self, expected_value=None): """ Save this object as it is, with an optional expected value :param expected_value: Optional tuple of Attribute, and Value that must be the same in order to save this object. If this condition is not met, an SDBResponseError will be raised with a Confict status code. :type expected_value: tuple or list :return: This object :rtype: :class:`boto.sdb.db.model.Model` """ self._manager.save_object(self, expected_value) return self save = put def put_attributes(self, attrs): """ Save just these few attributes, not the whole object :param attrs: Attributes to save, key->value dict :type attrs: dict :return: self :rtype: :class:`boto.sdb.db.model.Model` """ assert(isinstance(attrs, dict)), "Argument must be a dict of key->values to save" for prop_name in attrs: value = attrs[prop_name] prop = self.find_property(prop_name) assert(prop), "Property not found: %s" % prop_name self._manager.set_property(prop, self, prop_name, value) self.reload() return self def delete_attributes(self, attrs): """ Delete just these attributes, not the whole object. :param attrs: Attributes to save, as a list of string names :type attrs: list :return: self :rtype: :class:`boto.sdb.db.model.Model` """ assert(isinstance(attrs, list)), "Argument must be a list of names of keys to delete." self._manager.domain.delete_attributes(self.id, attrs) self.reload() return self save_attributes = put_attributes def delete(self): self._manager.delete_object(self) def key(self): return Key(obj=self) def set_manager(self, manager): self._manager = manager def to_dict(self): props = {} for prop in self.properties(hidden=False): props[prop.name] = getattr(self, prop.name) obj = {'properties' : props, 'id' : self.id} return {self.__class__.__name__ : obj} def to_xml(self, doc=None): xmlmanager = self.get_xmlmanager() doc = xmlmanager.marshal_object(self, doc) return doc @classmethod def find_subclass(cls, name): """Find a subclass with a given name""" if name == cls.__name__: return cls for sc in cls.__sub_classes__: r = sc.find_subclass(name) if r != None: return r class Expando(Model): def __setattr__(self, name, value): if name in self._prop_names: object.__setattr__(self, name, value) elif name.startswith('_'): object.__setattr__(self, name, value) elif name == 'id': object.__setattr__(self, name, value) else: self._manager.set_key_value(self, name, value) object.__setattr__(self, name, value) def __getattr__(self, name): if not name.startswith('_'): value = self._manager.get_key_value(self, name) if value: object.__setattr__(self, name, value) return value raise AttributeError ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/db/property.py ================================================ # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import datetime from key import Key from boto.utils import Password from boto.sdb.db.query import Query import re import boto import boto.s3.key from boto.sdb.db.blob import Blob class Property(object): data_type = str type_name = '' name = '' verbose_name = '' def __init__(self, verbose_name=None, name=None, default=None, required=False, validator=None, choices=None, unique=False): self.verbose_name = verbose_name self.name = name self.default = default self.required = required self.validator = validator self.choices = choices if self.name: self.slot_name = '_' + self.name else: self.slot_name = '_' self.unique = unique def __get__(self, obj, objtype): if obj: obj.load() return getattr(obj, self.slot_name) else: return None def __set__(self, obj, value): self.validate(value) # Fire off any on_set functions try: if obj._loaded and hasattr(obj, "on_set_%s" % self.name): fnc = getattr(obj, "on_set_%s" % self.name) value = fnc(value) except Exception: boto.log.exception("Exception running on_set_%s" % self.name) setattr(obj, self.slot_name, value) def __property_config__(self, model_class, property_name): self.model_class = model_class self.name = property_name self.slot_name = '_' + self.name def default_validator(self, value): if isinstance(value, basestring) or value == self.default_value(): return if not isinstance(value, self.data_type): raise TypeError, 'Validation Error, expecting %s, got %s' % (self.data_type, type(value)) def default_value(self): return self.default def validate(self, value): if self.required and value==None: raise ValueError, '%s is a required property' % self.name if self.choices and value and not value in self.choices: raise ValueError, '%s not a valid choice for %s.%s' % (value, self.model_class.__name__, self.name) if self.validator: self.validator(value) else: self.default_validator(value) return value def empty(self, value): return not value def get_value_for_datastore(self, model_instance): return getattr(model_instance, self.name) def make_value_from_datastore(self, value): return value def get_choices(self): if callable(self.choices): return self.choices() return self.choices def validate_string(value): if value == None: return elif isinstance(value, str) or isinstance(value, unicode): if len(value) > 1024: raise ValueError, 'Length of value greater than maxlength' else: raise TypeError, 'Expecting String, got %s' % type(value) class StringProperty(Property): type_name = 'String' def __init__(self, verbose_name=None, name=None, default='', required=False, validator=validate_string, choices=None, unique=False): Property.__init__(self, verbose_name, name, default, required, validator, choices, unique) class TextProperty(Property): type_name = 'Text' def __init__(self, verbose_name=None, name=None, default='', required=False, validator=None, choices=None, unique=False, max_length=None): Property.__init__(self, verbose_name, name, default, required, validator, choices, unique) self.max_length = max_length def validate(self, value): value = super(TextProperty, self).validate(value) if not isinstance(value, str) and not isinstance(value, unicode): raise TypeError, 'Expecting Text, got %s' % type(value) if self.max_length and len(value) > self.max_length: raise ValueError, 'Length of value greater than maxlength %s' % self.max_length class PasswordProperty(StringProperty): """ Hashed property whose original value can not be retrieved, but still can be compared. Works by storing a hash of the original value instead of the original value. Once that's done all that can be retrieved is the hash. The comparison obj.password == 'foo' generates a hash of 'foo' and compares it to the stored hash. Underlying data type for hashing, storing, and comparing is boto.utils.Password. The default hash function is defined there ( currently sha512 in most cases, md5 where sha512 is not available ) It's unlikely you'll ever need to use a different hash function, but if you do, you can control the behavior in one of two ways: 1) Specifying hashfunc in PasswordProperty constructor import hashlib class MyModel(model): password = PasswordProperty(hashfunc=hashlib.sha224) 2) Subclassing Password and PasswordProperty class SHA224Password(Password): hashfunc=hashlib.sha224 class SHA224PasswordProperty(PasswordProperty): data_type=MyPassword type_name="MyPassword" class MyModel(Model): password = SHA224PasswordProperty() """ data_type = Password type_name = 'Password' def __init__(self, verbose_name=None, name=None, default='', required=False, validator=None, choices=None, unique=False, hashfunc=None): """ The hashfunc parameter overrides the default hashfunc in boto.utils.Password. The remaining parameters are passed through to StringProperty.__init__""" StringProperty.__init__(self, verbose_name, name, default, required, validator, choices, unique) self.hashfunc=hashfunc def make_value_from_datastore(self, value): p = self.data_type(value, hashfunc=self.hashfunc) return p def get_value_for_datastore(self, model_instance): value = StringProperty.get_value_for_datastore(self, model_instance) if value and len(value): return str(value) else: return None def __set__(self, obj, value): if not isinstance(value, self.data_type): p = self.data_type(hashfunc=self.hashfunc) p.set(value) value = p Property.__set__(self, obj, value) def __get__(self, obj, objtype): return self.data_type(StringProperty.__get__(self, obj, objtype), hashfunc=self.hashfunc) def validate(self, value): value = Property.validate(self, value) if isinstance(value, self.data_type): if len(value) > 1024: raise ValueError, 'Length of value greater than maxlength' else: raise TypeError, 'Expecting %s, got %s' % (type(self.data_type), type(value)) class BlobProperty(Property): data_type = Blob type_name = "blob" def __set__(self, obj, value): if value != self.default_value(): if not isinstance(value, Blob): oldb = self.__get__(obj, type(obj)) id = None if oldb: id = oldb.id b = Blob(value=value, id=id) value = b Property.__set__(self, obj, value) class S3KeyProperty(Property): data_type = boto.s3.key.Key type_name = 'S3Key' validate_regex = "^s3:\/\/([^\/]*)\/(.*)$" def __init__(self, verbose_name=None, name=None, default=None, required=False, validator=None, choices=None, unique=False): Property.__init__(self, verbose_name, name, default, required, validator, choices, unique) def validate(self, value): value = super(S3KeyProperty, self).validate(value) if value == self.default_value() or value == str(self.default_value()): return self.default_value() if isinstance(value, self.data_type): return match = re.match(self.validate_regex, value) if match: return raise TypeError, 'Validation Error, expecting %s, got %s' % (self.data_type, type(value)) def __get__(self, obj, objtype): value = Property.__get__(self, obj, objtype) if value: if isinstance(value, self.data_type): return value match = re.match(self.validate_regex, value) if match: s3 = obj._manager.get_s3_connection() bucket = s3.get_bucket(match.group(1), validate=False) k = bucket.get_key(match.group(2)) if not k: k = bucket.new_key(match.group(2)) k.set_contents_from_string("") return k else: return value def get_value_for_datastore(self, model_instance): value = Property.get_value_for_datastore(self, model_instance) if value: return "s3://%s/%s" % (value.bucket.name, value.name) else: return None class IntegerProperty(Property): data_type = int type_name = 'Integer' def __init__(self, verbose_name=None, name=None, default=0, required=False, validator=None, choices=None, unique=False, max=2147483647, min=-2147483648): Property.__init__(self, verbose_name, name, default, required, validator, choices, unique) self.max = max self.min = min def validate(self, value): value = int(value) value = Property.validate(self, value) if value > self.max: raise ValueError, 'Maximum value is %d' % self.max if value < self.min: raise ValueError, 'Minimum value is %d' % self.min return value def empty(self, value): return value is None def __set__(self, obj, value): if value == "" or value == None: value = 0 return Property.__set__(self, obj, value) class LongProperty(Property): data_type = long type_name = 'Long' def __init__(self, verbose_name=None, name=None, default=0, required=False, validator=None, choices=None, unique=False): Property.__init__(self, verbose_name, name, default, required, validator, choices, unique) def validate(self, value): value = long(value) value = Property.validate(self, value) min = -9223372036854775808 max = 9223372036854775807 if value > max: raise ValueError, 'Maximum value is %d' % max if value < min: raise ValueError, 'Minimum value is %d' % min return value def empty(self, value): return value is None class BooleanProperty(Property): data_type = bool type_name = 'Boolean' def __init__(self, verbose_name=None, name=None, default=False, required=False, validator=None, choices=None, unique=False): Property.__init__(self, verbose_name, name, default, required, validator, choices, unique) def empty(self, value): return value is None class FloatProperty(Property): data_type = float type_name = 'Float' def __init__(self, verbose_name=None, name=None, default=0.0, required=False, validator=None, choices=None, unique=False): Property.__init__(self, verbose_name, name, default, required, validator, choices, unique) def validate(self, value): value = float(value) value = Property.validate(self, value) return value def empty(self, value): return value is None class DateTimeProperty(Property): data_type = datetime.datetime type_name = 'DateTime' def __init__(self, verbose_name=None, auto_now=False, auto_now_add=False, name=None, default=None, required=False, validator=None, choices=None, unique=False): Property.__init__(self, verbose_name, name, default, required, validator, choices, unique) self.auto_now = auto_now self.auto_now_add = auto_now_add def default_value(self): if self.auto_now or self.auto_now_add: return self.now() return Property.default_value(self) def validate(self, value): value = super(DateTimeProperty, self).validate(value) if value == None: return if not isinstance(value, self.data_type): raise TypeError, 'Validation Error, expecting %s, got %s' % (self.data_type, type(value)) def get_value_for_datastore(self, model_instance): if self.auto_now: setattr(model_instance, self.name, self.now()) return Property.get_value_for_datastore(self, model_instance) def now(self): return datetime.datetime.utcnow() class DateProperty(Property): data_type = datetime.date type_name = 'Date' def __init__(self, verbose_name=None, auto_now=False, auto_now_add=False, name=None, default=None, required=False, validator=None, choices=None, unique=False): Property.__init__(self, verbose_name, name, default, required, validator, choices, unique) self.auto_now = auto_now self.auto_now_add = auto_now_add def default_value(self): if self.auto_now or self.auto_now_add: return self.now() return Property.default_value(self) def validate(self, value): value = super(DateProperty, self).validate(value) if value == None: return if not isinstance(value, self.data_type): raise TypeError, 'Validation Error, expecting %s, got %s' % (self.data_type, type(value)) def get_value_for_datastore(self, model_instance): if self.auto_now: setattr(model_instance, self.name, self.now()) val = Property.get_value_for_datastore(self, model_instance) if isinstance(val, datetime.datetime): val = val.date() return val def now(self): return datetime.date.today() class TimeProperty(Property): data_type = datetime.time type_name = 'Time' def __init__(self, verbose_name=None, name=None, default=None, required=False, validator=None, choices=None, unique=False): Property.__init__(self, verbose_name, name, default, required, validator, choices, unique) def validate(self, value): value = super(TimeProperty, self).validate(value) if value is None: return if not isinstance(value, self.data_type): raise TypeError, 'Validation Error, expecting %s, got %s' % (self.data_type, type(value)) class ReferenceProperty(Property): data_type = Key type_name = 'Reference' def __init__(self, reference_class=None, collection_name=None, verbose_name=None, name=None, default=None, required=False, validator=None, choices=None, unique=False): Property.__init__(self, verbose_name, name, default, required, validator, choices, unique) self.reference_class = reference_class self.collection_name = collection_name def __get__(self, obj, objtype): if obj: value = getattr(obj, self.slot_name) if value == self.default_value(): return value # If the value is still the UUID for the referenced object, we need to create # the object now that is the attribute has actually been accessed. This lazy # instantiation saves unnecessary roundtrips to SimpleDB if isinstance(value, str) or isinstance(value, unicode): value = self.reference_class(value) setattr(obj, self.name, value) return value def __set__(self, obj, value): """Don't allow this object to be associated to itself This causes bad things to happen""" if value != None and (obj.id == value or (hasattr(value, "id") and obj.id == value.id)): raise ValueError, "Can not associate an object with itself!" return super(ReferenceProperty, self).__set__(obj,value) def __property_config__(self, model_class, property_name): Property.__property_config__(self, model_class, property_name) if self.collection_name is None: self.collection_name = '%s_%s_set' % (model_class.__name__.lower(), self.name) if hasattr(self.reference_class, self.collection_name): raise ValueError, 'duplicate property: %s' % self.collection_name setattr(self.reference_class, self.collection_name, _ReverseReferenceProperty(model_class, property_name, self.collection_name)) def check_uuid(self, value): # This does a bit of hand waving to "type check" the string t = value.split('-') if len(t) != 5: raise ValueError def check_instance(self, value): try: obj_lineage = value.get_lineage() cls_lineage = self.reference_class.get_lineage() if obj_lineage.startswith(cls_lineage): return raise TypeError, '%s not instance of %s' % (obj_lineage, cls_lineage) except: raise ValueError, '%s is not a Model' % value def validate(self, value): if self.validator: self.validator(value) if self.required and value==None: raise ValueError, '%s is a required property' % self.name if value == self.default_value(): return if not isinstance(value, str) and not isinstance(value, unicode): self.check_instance(value) class _ReverseReferenceProperty(Property): data_type = Query type_name = 'query' def __init__(self, model, prop, name): self.__model = model self.__property = prop self.collection_name = prop self.name = name self.item_type = model def __get__(self, model_instance, model_class): """Fetches collection of model instances of this collection property.""" if model_instance is not None: query = Query(self.__model) if type(self.__property) == list: props = [] for prop in self.__property: props.append("%s =" % prop) return query.filter(props, model_instance) else: return query.filter(self.__property + ' =', model_instance) else: return self def __set__(self, model_instance, value): """Not possible to set a new collection.""" raise ValueError, 'Virtual property is read-only' class CalculatedProperty(Property): def __init__(self, verbose_name=None, name=None, default=None, required=False, validator=None, choices=None, calculated_type=int, unique=False, use_method=False): Property.__init__(self, verbose_name, name, default, required, validator, choices, unique) self.calculated_type = calculated_type self.use_method = use_method def __get__(self, obj, objtype): value = self.default_value() if obj: try: value = getattr(obj, self.slot_name) if self.use_method: value = value() except AttributeError: pass return value def __set__(self, obj, value): """Not possible to set a new AutoID.""" pass def _set_direct(self, obj, value): if not self.use_method: setattr(obj, self.slot_name, value) def get_value_for_datastore(self, model_instance): if self.calculated_type in [str, int, bool]: value = self.__get__(model_instance, model_instance.__class__) return value else: return None class ListProperty(Property): data_type = list type_name = 'List' def __init__(self, item_type, verbose_name=None, name=None, default=None, **kwds): if default is None: default = [] self.item_type = item_type Property.__init__(self, verbose_name, name, default=default, required=True, **kwds) def validate(self, value): if self.validator: self.validator(value) if value is not None: if not isinstance(value, list): value = [value] if self.item_type in (int, long): item_type = (int, long) elif self.item_type in (str, unicode): item_type = (str, unicode) else: item_type = self.item_type for item in value: if not isinstance(item, item_type): if item_type == (int, long): raise ValueError, 'Items in the %s list must all be integers.' % self.name else: raise ValueError('Items in the %s list must all be %s instances' % (self.name, self.item_type.__name__)) return value def empty(self, value): return value is None def default_value(self): return list(super(ListProperty, self).default_value()) def __set__(self, obj, value): """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""" if self.item_type in (int, long): item_type = (int, long) elif self.item_type in (str, unicode): item_type = (str, unicode) else: item_type = self.item_type if isinstance(value, item_type): value = [value] elif value == None: # Override to allow them to set this to "None" to remove everything value = [] return super(ListProperty, self).__set__(obj,value) class MapProperty(Property): data_type = dict type_name = 'Map' def __init__(self, item_type=str, verbose_name=None, name=None, default=None, **kwds): if default is None: default = {} self.item_type = item_type Property.__init__(self, verbose_name, name, default=default, required=True, **kwds) def validate(self, value): value = super(MapProperty, self).validate(value) if value is not None: if not isinstance(value, dict): raise ValueError, 'Value must of type dict' if self.item_type in (int, long): item_type = (int, long) elif self.item_type in (str, unicode): item_type = (str, unicode) else: item_type = self.item_type for key in value: if not isinstance(value[key], item_type): if item_type == (int, long): raise ValueError, 'Values in the %s Map must all be integers.' % self.name else: raise ValueError('Values in the %s Map must all be %s instances' % (self.name, self.item_type.__name__)) return value def empty(self, value): return value is None def default_value(self): return {} ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/db/query.py ================================================ # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class Query(object): __local_iter__ = None def __init__(self, model_class, limit=None, next_token=None, manager=None): self.model_class = model_class self.limit = limit self.offset = 0 if manager: self.manager = manager else: self.manager = self.model_class._manager self.filters = [] self.select = None self.sort_by = None self.rs = None self.next_token = next_token def __iter__(self): return iter(self.manager.query(self)) def next(self): if self.__local_iter__ == None: self.__local_iter__ = self.__iter__() return self.__local_iter__.next() def filter(self, property_operator, value): self.filters.append((property_operator, value)) return self def fetch(self, limit, offset=0): """Not currently fully supported, but we can use this to allow them to set a limit in a chainable method""" self.limit = limit self.offset = offset return self def count(self, quick=True): return self.manager.count(self.model_class, self.filters, quick, self.sort_by, self.select) def get_query(self): return self.manager._build_filter_part(self.model_class, self.filters, self.sort_by, self.select) def order(self, key): self.sort_by = key return self def to_xml(self, doc=None): if not doc: xmlmanager = self.model_class.get_xmlmanager() doc = xmlmanager.new_doc() for obj in self: obj.to_xml(doc) return doc def get_next_token(self): if self.rs: return self.rs.next_token if self._next_token: return self._next_token return None def set_next_token(self, token): self._next_token = token next_token = property(get_next_token, set_next_token) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/db/sequence.py ================================================ # Copyright (c) 2010 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.exception import SDBResponseError class SequenceGenerator(object): """Generic Sequence Generator object, this takes a single string as the "sequence" and uses that to figure out what the next value in a string is. For example if you give "ABC" and pass in "A" it will give you "B", and if you give it "C" it will give you "AA". If you set "rollover" to True in the above example, passing in "C" would give you "A" again. The Sequence string can be a string or any iterable that has the "index" function and is indexable. """ __name__ = "SequenceGenerator" def __init__(self, sequence_string, rollover=False): """Create a new SequenceGenerator using the sequence_string as how to generate the next item. :param sequence_string: The string or list that explains how to generate the next item in the sequence :type sequence_string: str,iterable :param rollover: Rollover instead of incrementing when we hit the end of the sequence :type rollover: bool """ self.sequence_string = sequence_string self.sequence_length = len(sequence_string[0]) self.rollover = rollover self.last_item = sequence_string[-1] self.__name__ = "%s('%s')" % (self.__class__.__name__, sequence_string) def __call__(self, val, last=None): """Get the next value in the sequence""" # If they pass us in a string that's not at least # the lenght of our sequence, then return the # first element in our sequence if val == None or len(val) < self.sequence_length: return self.sequence_string[0] last_value = val[-self.sequence_length:] if (not self.rollover) and (last_value == self.last_item): val = "%s%s" % (self(val[:-self.sequence_length]), self._inc(last_value)) else: val = "%s%s" % (val[:-self.sequence_length], self._inc(last_value)) return val def _inc(self, val): """Increment a single value""" assert(len(val) == self.sequence_length) return self.sequence_string[(self.sequence_string.index(val)+1) % len(self.sequence_string)] # # Simple Sequence Functions # def increment_by_one(cv=None, lv=None): if cv == None: return 0 return cv + 1 def double(cv=None, lv=None): if cv == None: return 1 return cv * 2 def fib(cv=1, lv=0): """The fibonacci sequence, this incrementer uses the last value""" if cv == None: cv = 1 if lv == None: lv = 0 return cv + lv increment_string = SequenceGenerator("ABCDEFGHIJKLMNOPQRSTUVWXYZ") class Sequence(object): """A simple Sequence using the new SDB "Consistent" features Based largly off of the "Counter" example from mitch garnaat: http://bitbucket.org/mitch/stupidbototricks/src/tip/counter.py""" def __init__(self, id=None, domain_name=None, fnc=increment_by_one, init_val=None): """Create a new Sequence, using an optional function to increment to the next number, by default we just increment by one. Every parameter here is optional, if you don't specify any options then you'll get a new SequenceGenerator with a random ID stored in the default domain that increments by one and uses the default botoweb environment :param id: Optional ID (name) for this counter :type id: str :param domain_name: Optional domain name to use, by default we get this out of the environment configuration :type domain_name:str :param fnc: Optional function to use for the incrementation, by default we just increment by one There are several functions defined in this module. Your function must accept "None" to get the initial value :type fnc: function, str :param init_val: Initial value, by default this is the first element in your sequence, but you can pass in any value, even a string if you pass in a function that uses strings instead of ints to increment """ self._db = None self._value = None self.last_value = None self.domain_name = domain_name self.id = id if self.id == None: import uuid self.id = str(uuid.uuid4()) if init_val == None: init_val = fnc(init_val) self.val = init_val self.item_type = type(fnc(None)) self.timestamp = None # Allow us to pass in a full name to a function if type(fnc) == str: from boto.utils import find_class fnc = find_class(fnc) self.fnc = fnc def set(self, val): """Set the value""" import time now = time.time() expected_value = [] new_val = {} new_val['timestamp'] = now if self._value != None: new_val['last_value'] = self._value expected_value = ['current_value', str(self._value)] new_val['current_value'] = val try: self.db.put_attributes(self.id, new_val, expected_value=expected_value) self.timestamp = new_val['timestamp'] except SDBResponseError, e: if e.status == 409: raise ValueError, "Sequence out of sync" else: raise def get(self): """Get the value""" val = self.db.get_attributes(self.id, consistent_read=True) if val and val.has_key('timestamp'): self.timestamp = val['timestamp'] if val and val.has_key('current_value'): self._value = self.item_type(val['current_value']) if val.has_key("last_value") and val['last_value'] != None: self.last_value = self.item_type(val['last_value']) return self._value val = property(get, set) def __repr__(self): return "%s('%s', '%s', '%s.%s', '%s')" % ( self.__class__.__name__, self.id, self.domain_name, self.fnc.__module__, self.fnc.__name__, self.val) def _connect(self): """Connect to our domain""" if not self._db: import boto sdb = boto.connect_sdb() if not self.domain_name: self.domain_name = boto.config.get("DB", "sequence_db", boto.config.get("DB", "db_name", "default")) try: self._db = sdb.get_domain(self.domain_name) except SDBResponseError, e: if e.status == 400: self._db = sdb.create_domain(self.domain_name) else: raise return self._db db = property(_connect) def next(self): self.val = self.fnc(self.val, self.last_value) return self.val def delete(self): """Remove this sequence""" self.db.delete_attributes(self.id) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/db/test_db.py ================================================ from boto.sdb.db.model import Model from boto.sdb.db.property import StringProperty, IntegerProperty, BooleanProperty from boto.sdb.db.property import DateTimeProperty, FloatProperty, ReferenceProperty from boto.sdb.db.property import PasswordProperty, ListProperty, MapProperty from datetime import datetime import time from boto.exception import SDBPersistenceError _objects = {} # # This will eventually be moved to the boto.tests module and become a real unit test # but for now it will live here. It shows examples of each of the Property types in # use and tests the basic operations. # class TestBasic(Model): name = StringProperty() size = IntegerProperty() foo = BooleanProperty() date = DateTimeProperty() class TestFloat(Model): name = StringProperty() value = FloatProperty() class TestRequired(Model): req = StringProperty(required=True, default='foo') class TestReference(Model): ref = ReferenceProperty(reference_class=TestBasic, collection_name='refs') class TestSubClass(TestBasic): answer = IntegerProperty() class TestPassword(Model): password = PasswordProperty() class TestList(Model): name = StringProperty() nums = ListProperty(int) class TestMap(Model): name = StringProperty() map = MapProperty() class TestListReference(Model): name = StringProperty() basics = ListProperty(TestBasic) class TestAutoNow(Model): create_date = DateTimeProperty(auto_now_add=True) modified_date = DateTimeProperty(auto_now=True) class TestUnique(Model): name = StringProperty(unique=True) def test_basic(): global _objects t = TestBasic() t.name = 'simple' t.size = -42 t.foo = True t.date = datetime.now() print 'saving object' t.put() _objects['test_basic_t'] = t time.sleep(5) print 'now try retrieving it' tt = TestBasic.get_by_id(t.id) _objects['test_basic_tt'] = tt assert tt.id == t.id l = TestBasic.get_by_id([t.id]) assert len(l) == 1 assert l[0].id == t.id assert t.size == tt.size assert t.foo == tt.foo assert t.name == tt.name #assert t.date == tt.date return t def test_float(): global _objects t = TestFloat() t.name = 'float object' t.value = 98.6 print 'saving object' t.save() _objects['test_float_t'] = t time.sleep(5) print 'now try retrieving it' tt = TestFloat.get_by_id(t.id) _objects['test_float_tt'] = tt assert tt.id == t.id assert tt.name == t.name assert tt.value == t.value return t def test_required(): global _objects t = TestRequired() _objects['test_required_t'] = t t.put() return t def test_reference(t=None): global _objects if not t: t = test_basic() tt = TestReference() tt.ref = t tt.put() time.sleep(10) tt = TestReference.get_by_id(tt.id) _objects['test_reference_tt'] = tt assert tt.ref.id == t.id for o in t.refs: print o def test_subclass(): global _objects t = TestSubClass() _objects['test_subclass_t'] = t t.name = 'a subclass' t.size = -489 t.save() def test_password(): global _objects t = TestPassword() _objects['test_password_t'] = t t.password = "foo" t.save() time.sleep(5) # Make sure it stored ok tt = TestPassword.get_by_id(t.id) _objects['test_password_tt'] = tt #Testing password equality assert tt.password == "foo" #Testing password not stored as string assert str(tt.password) != "foo" def test_list(): global _objects t = TestList() _objects['test_list_t'] = t t.name = 'a list of ints' t.nums = [1,2,3,4,5] t.put() tt = TestList.get_by_id(t.id) _objects['test_list_tt'] = tt assert tt.name == t.name for n in tt.nums: assert isinstance(n, int) def test_list_reference(): global _objects t = TestBasic() t.put() _objects['test_list_ref_t'] = t tt = TestListReference() tt.name = "foo" tt.basics = [t] tt.put() time.sleep(5) _objects['test_list_ref_tt'] = tt ttt = TestListReference.get_by_id(tt.id) assert ttt.basics[0].id == t.id def test_unique(): global _objects t = TestUnique() name = 'foo' + str(int(time.time())) t.name = name t.put() _objects['test_unique_t'] = t time.sleep(10) tt = TestUnique() _objects['test_unique_tt'] = tt tt.name = name try: tt.put() assert False except(SDBPersistenceError): pass def test_datetime(): global _objects t = TestAutoNow() t.put() _objects['test_datetime_t'] = t time.sleep(5) tt = TestAutoNow.get_by_id(t.id) assert tt.create_date.timetuple() == t.create_date.timetuple() def test(): print 'test_basic' t1 = test_basic() print 'test_required' test_required() print 'test_reference' test_reference(t1) print 'test_subclass' test_subclass() print 'test_password' test_password() print 'test_list' test_list() print 'test_list_reference' test_list_reference() print "test_datetime" test_datetime() print 'test_unique' test_unique() if __name__ == "__main__": test() ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/domain.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an SDB Domain """ from boto.sdb.queryresultset import SelectResultSet class Domain: def __init__(self, connection=None, name=None): self.connection = connection self.name = name self._metadata = None def __repr__(self): return 'Domain:%s' % self.name def __iter__(self): return iter(self.select("SELECT * FROM `%s`" % self.name)) def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'DomainName': self.name = value else: setattr(self, name, value) def get_metadata(self): if not self._metadata: self._metadata = self.connection.domain_metadata(self) return self._metadata def put_attributes(self, item_name, attributes, replace=True, expected_value=None): """ Store attributes for a given item. :type item_name: string :param item_name: The name of the item whose attributes are being stored. :type attribute_names: dict or dict-like object :param attribute_names: The name/value pairs to store as attributes :type expected_value: list :param expected_value: If supplied, this is a list or tuple consisting of a single attribute name and expected value. The list can be of the form: * ['name', 'value'] In which case the call will first verify that the attribute "name" of this item has a value of "value". If it does, the delete will proceed, otherwise a ConditionalCheckFailed error will be returned. The list can also be of the form: * ['name', True|False] which will simply check for the existence (True) or non-existence (False) of the attribute. :type replace: bool :param replace: Whether the attribute values passed in will replace existing values or will be added as addition values. Defaults to True. :rtype: bool :return: True if successful """ return self.connection.put_attributes(self, item_name, attributes, replace, expected_value) def batch_put_attributes(self, items, replace=True): """ Store attributes for multiple items. :type items: dict or dict-like object :param items: A dictionary-like object. The keys of the dictionary are the item names and the values are themselves dictionaries of attribute names/values, exactly the same as the attribute_names parameter of the scalar put_attributes call. :type replace: bool :param replace: Whether the attribute values passed in will replace existing values or will be added as addition values. Defaults to True. :rtype: bool :return: True if successful """ return self.connection.batch_put_attributes(self, items, replace) def get_attributes(self, item_name, attribute_name=None, consistent_read=False, item=None): """ Retrieve attributes for a given item. :type item_name: string :param item_name: The name of the item whose attributes are being retrieved. :type attribute_names: string or list of strings :param attribute_names: An attribute name or list of attribute names. This parameter is optional. If not supplied, all attributes will be retrieved for the item. :rtype: :class:`boto.sdb.item.Item` :return: An Item mapping type containing the requested attribute name/values """ return self.connection.get_attributes(self, item_name, attribute_name, consistent_read, item) def delete_attributes(self, item_name, attributes=None, expected_values=None): """ Delete attributes from a given item. :type item_name: string :param item_name: The name of the item whose attributes are being deleted. :type attributes: dict, list or :class:`boto.sdb.item.Item` :param attributes: Either a list containing attribute names which will cause all values associated with that attribute name to be deleted or a dict or Item containing the attribute names and keys and list of values to delete as the value. If no value is supplied, all attribute name/values for the item will be deleted. :type expected_value: list :param expected_value: If supplied, this is a list or tuple consisting of a single attribute name and expected value. The list can be of the form: * ['name', 'value'] In which case the call will first verify that the attribute "name" of this item has a value of "value". If it does, the delete will proceed, otherwise a ConditionalCheckFailed error will be returned. The list can also be of the form: * ['name', True|False] which will simply check for the existence (True) or non-existence (False) of the attribute. :rtype: bool :return: True if successful """ return self.connection.delete_attributes(self, item_name, attributes, expected_values) def batch_delete_attributes(self, items): """ Delete multiple items in this domain. :type items: dict or dict-like object :param items: A dictionary-like object. The keys of the dictionary are the item names and the values are either: * dictionaries of attribute names/values, exactly the same as the attribute_names parameter of the scalar put_attributes call. The attribute name/value pairs will only be deleted if they match the name/value pairs passed in. * None which means that all attributes associated with the item should be deleted. :rtype: bool :return: True if successful """ return self.connection.batch_delete_attributes(self, items) def select(self, query='', next_token=None, consistent_read=False, max_items=None): """ Returns a set of Attributes for item names within domain_name that match the query. The query must be expressed in using the SELECT style syntax rather than the original SimpleDB query language. :type query: string :param query: The SimpleDB query to be performed. :rtype: iter :return: An iterator containing the results. This is actually a generator function that will iterate across all search results, not just the first page. """ return SelectResultSet(self, query, max_items=max_items, next_token=next_token, consistent_read=consistent_read) def get_item(self, item_name, consistent_read=False): """ Retrieves an item from the domain, along with all of its attributes. :param string item_name: The name of the item to retrieve. :rtype: :class:`boto.sdb.item.Item` or ``None`` :keyword bool consistent_read: When set to true, ensures that the most recent data is returned. :return: The requested item, or ``None`` if there was no match found """ item = self.get_attributes(item_name, consistent_read=consistent_read) if item: item.domain = self return item else: return None def new_item(self, item_name): return self.connection.item_cls(self, item_name) def delete_item(self, item): self.delete_attributes(item.name) def to_xml(self, f=None): """Get this domain as an XML DOM Document :param f: Optional File to dump directly to :type f: File or Stream :return: File object where the XML has been dumped to :rtype: file """ if not f: from tempfile import TemporaryFile f = TemporaryFile() print >> f, '' print >> f, '' % self.name for item in self: print >> f, '\t' % item.name for k in item: print >> f, '\t\t' % k values = item[k] if not isinstance(values, list): values = [values] for value in values: print >> f, '\t\t\t> f, ']]>' print >> f, '\t\t' print >> f, '\t' print >> f, '' f.flush() f.seek(0) return f def from_xml(self, doc): """Load this domain based on an XML document""" import xml.sax handler = DomainDumpParser(self) xml.sax.parse(doc, handler) return handler def delete(self): """ Delete this domain, and all items under it """ return self.connection.delete_domain(self) class DomainMetaData: def __init__(self, domain=None): self.domain = domain self.item_count = None self.item_names_size = None self.attr_name_count = None self.attr_names_size = None self.attr_value_count = None self.attr_values_size = None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'ItemCount': self.item_count = int(value) elif name == 'ItemNamesSizeBytes': self.item_names_size = int(value) elif name == 'AttributeNameCount': self.attr_name_count = int(value) elif name == 'AttributeNamesSizeBytes': self.attr_names_size = int(value) elif name == 'AttributeValueCount': self.attr_value_count = int(value) elif name == 'AttributeValuesSizeBytes': self.attr_values_size = int(value) elif name == 'Timestamp': self.timestamp = value else: setattr(self, name, value) import sys from xml.sax.handler import ContentHandler class DomainDumpParser(ContentHandler): """ SAX parser for a domain that has been dumped """ def __init__(self, domain): self.uploader = UploaderThread(domain) self.item_id = None self.attrs = {} self.attribute = None self.value = "" self.domain = domain def startElement(self, name, attrs): if name == "Item": self.item_id = attrs['id'] self.attrs = {} elif name == "attribute": self.attribute = attrs['id'] elif name == "value": self.value = "" def characters(self, ch): self.value += ch def endElement(self, name): if name == "value": if self.value and self.attribute: value = self.value.strip() attr_name = self.attribute.strip() if self.attrs.has_key(attr_name): self.attrs[attr_name].append(value) else: self.attrs[attr_name] = [value] elif name == "Item": self.uploader.items[self.item_id] = self.attrs # Every 20 items we spawn off the uploader if len(self.uploader.items) >= 20: self.uploader.start() self.uploader = UploaderThread(self.domain) elif name == "Domain": # If we're done, spawn off our last Uploader Thread self.uploader.start() from threading import Thread class UploaderThread(Thread): """Uploader Thread""" def __init__(self, domain): self.db = domain self.items = {} Thread.__init__(self) def run(self): try: self.db.batch_put_attributes(self.items) except: print "Exception using batch put, trying regular put instead" for item_name in self.items: self.db.put_attributes(item_name, self.items[item_name]) print ".", sys.stdout.flush() ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/item.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import base64 class Item(dict): """ A ``dict`` sub-class that serves as an object representation of a SimpleDB item. An item in SDB is similar to a row in a relational database. Items belong to a :py:class:`Domain `, which is similar to a table in a relational database. The keys on instances of this object correspond to attributes that are stored on the SDB item. .. tip:: While it is possible to instantiate this class directly, you may want to use the convenience methods on :py:class:`boto.sdb.domain.Domain` for that purpose. For example, :py:meth:`boto.sdb.domain.Domain.get_item`. """ def __init__(self, domain, name='', active=False): """ :type domain: :py:class:`boto.sdb.domain.Domain` :param domain: The domain that this item belongs to. :param str name: The name of this item. This name will be used when querying for items using methods like :py:meth:`boto.sdb.domain.Domain.get_item` """ dict.__init__(self) self.domain = domain self.name = name self.active = active self.request_id = None self.encoding = None self.in_attribute = False self.converter = self.domain.connection.converter def startElement(self, name, attrs, connection): if name == 'Attribute': self.in_attribute = True self.encoding = attrs.get('encoding', None) return None def decode_value(self, value): if self.encoding == 'base64': self.encoding = None return base64.decodestring(value) else: return value def endElement(self, name, value, connection): if name == 'ItemName': self.name = self.decode_value(value) elif name == 'Name': if self.in_attribute: self.last_key = self.decode_value(value) else: self.name = self.decode_value(value) elif name == 'Value': if self.has_key(self.last_key): if not isinstance(self[self.last_key], list): self[self.last_key] = [self[self.last_key]] value = self.decode_value(value) if self.converter: value = self.converter.decode(value) self[self.last_key].append(value) else: value = self.decode_value(value) if self.converter: value = self.converter.decode(value) self[self.last_key] = value elif name == 'BoxUsage': try: connection.box_usage += float(value) except: pass elif name == 'RequestId': self.request_id = value elif name == 'Attribute': self.in_attribute = False else: setattr(self, name, value) def load(self): """ Loads or re-loads this item's attributes from SDB. .. warning:: If you have changed attribute values on an Item instance, this method will over-write the values if they are different in SDB. For any local attributes that don't yet exist in SDB, they will be safe. """ self.domain.get_attributes(self.name, item=self) def save(self, replace=True): """ Saves this item to SDB. :param bool replace: If ``True``, delete any attributes on the remote SDB item that have a ``None`` value on this object. """ self.domain.put_attributes(self.name, self, replace) # Delete any attributes set to "None" if replace: del_attrs = [] for name in self: if self[name] == None: del_attrs.append(name) if len(del_attrs) > 0: self.domain.delete_attributes(self.name, del_attrs) def add_value(self, key, value): """ Helps set or add to attributes on this item. If you are adding a new attribute that has yet to be set, it will simply create an attribute named ``key`` with your given ``value`` as its value. If you are adding a value to an existing attribute, this method will convert the attribute to a list (if it isn't already) and append your new value to said list. For clarification, consider the following interactive session: .. code-block:: python >>> item = some_domain.get_item('some_item') >>> item.has_key('some_attr') False >>> item.add_value('some_attr', 1) >>> item['some_attr'] 1 >>> item.add_value('some_attr', 2) >>> item['some_attr'] [1, 2] :param str key: The attribute to add a value to. :param object value: The value to set or append to the attribute. """ if key in self: # We already have this key on the item. if not isinstance(self[key], list): # The key isn't already a list, take its current value and # convert it to a list with the only member being the # current value. self[key] = [self[key]] # Add the new value to the list. self[key].append(value) else: # This is a new attribute, just set it. self[key] = value def delete(self): """ Deletes this item in SDB. .. note:: This local Python object remains in its current state after deletion, this only deletes the remote item in SDB. """ self.domain.delete_item(self) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/queryresultset.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. def query_lister(domain, query='', max_items=None, attr_names=None): more_results = True num_results = 0 next_token = None while more_results: rs = domain.connection.query_with_attributes(domain, query, attr_names, next_token=next_token) for item in rs: if max_items: if num_results == max_items: raise StopIteration yield item num_results += 1 next_token = rs.next_token more_results = next_token != None class QueryResultSet: def __init__(self, domain=None, query='', max_items=None, attr_names=None): self.max_items = max_items self.domain = domain self.query = query self.attr_names = attr_names def __iter__(self): return query_lister(self.domain, self.query, self.max_items, self.attr_names) def select_lister(domain, query='', max_items=None): more_results = True num_results = 0 next_token = None while more_results: rs = domain.connection.select(domain, query, next_token=next_token) for item in rs: if max_items: if num_results == max_items: raise StopIteration yield item num_results += 1 next_token = rs.next_token more_results = next_token != None class SelectResultSet(object): def __init__(self, domain=None, query='', max_items=None, next_token=None, consistent_read=False): self.domain = domain self.query = query self.consistent_read = consistent_read self.max_items = max_items self.next_token = next_token def __iter__(self): more_results = True num_results = 0 while more_results: rs = self.domain.connection.select(self.domain, self.query, next_token=self.next_token, consistent_read=self.consistent_read) for item in rs: if self.max_items and num_results >= self.max_items: raise StopIteration yield item num_results += 1 self.next_token = rs.next_token if self.max_items and num_results >= self.max_items: raise StopIteration more_results = self.next_token != None def next(self): return self.__iter__().next() ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sdb/regioninfo.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # from boto.regioninfo import RegionInfo class SDBRegionInfo(RegionInfo): def __init__(self, connection=None, name=None, endpoint=None): from boto.sdb.connection import SDBConnection RegionInfo.__init__(self, connection, name, endpoint, SDBConnection) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/services/__init__.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # ================================================ FILE: deploy/third_party/boto-2.1.1/boto/services/bs.py ================================================ #!/usr/bin/env python # Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from optparse import OptionParser from boto.services.servicedef import ServiceDef from boto.services.submit import Submitter from boto.services.result import ResultProcessor import boto import sys, os, StringIO class BS(object): Usage = "usage: %prog [options] config_file command" Commands = {'reset' : 'Clear input queue and output bucket', 'submit' : 'Submit local files to the service', 'start' : 'Start the service', 'status' : 'Report on the status of the service buckets and queues', 'retrieve' : 'Retrieve output generated by a batch', 'batches' : 'List all batches stored in current output_domain'} def __init__(self): self.service_name = None self.parser = OptionParser(usage=self.Usage) self.parser.add_option("--help-commands", action="store_true", dest="help_commands", help="provides help on the available commands") self.parser.add_option("-a", "--access-key", action="store", type="string", help="your AWS Access Key") self.parser.add_option("-s", "--secret-key", action="store", type="string", help="your AWS Secret Access Key") self.parser.add_option("-p", "--path", action="store", type="string", dest="path", help="the path to local directory for submit and retrieve") self.parser.add_option("-k", "--keypair", action="store", type="string", dest="keypair", help="the SSH keypair used with launched instance(s)") self.parser.add_option("-l", "--leave", action="store_true", dest="leave", help="leave the files (don't retrieve) files during retrieve command") self.parser.set_defaults(leave=False) self.parser.add_option("-n", "--num-instances", action="store", type="string", dest="num_instances", help="the number of launched instance(s)") self.parser.set_defaults(num_instances=1) self.parser.add_option("-i", "--ignore-dirs", action="append", type="string", dest="ignore", help="directories that should be ignored by submit command") self.parser.add_option("-b", "--batch-id", action="store", type="string", dest="batch", help="batch identifier required by the retrieve command") def print_command_help(self): print '\nCommands:' for key in self.Commands.keys(): print ' %s\t\t%s' % (key, self.Commands[key]) def do_reset(self): iq = self.sd.get_obj('input_queue') if iq: print 'clearing out input queue' i = 0 m = iq.read() while m: i += 1 iq.delete_message(m) m = iq.read() print 'deleted %d messages' % i ob = self.sd.get_obj('output_bucket') ib = self.sd.get_obj('input_bucket') if ob: if ib and ob.name == ib.name: return print 'delete generated files in output bucket' i = 0 for k in ob: i += 1 k.delete() print 'deleted %d keys' % i def do_submit(self): if not self.options.path: self.parser.error('No path provided') if not os.path.exists(self.options.path): self.parser.error('Invalid path (%s)' % self.options.path) s = Submitter(self.sd) t = s.submit_path(self.options.path, None, self.options.ignore, None, None, True, self.options.path) print 'A total of %d files were submitted' % t[1] print 'Batch Identifier: %s' % t[0] def do_start(self): ami_id = self.sd.get('ami_id') instance_type = self.sd.get('instance_type', 'm1.small') security_group = self.sd.get('security_group', 'default') if not ami_id: self.parser.error('ami_id option is required when starting the service') ec2 = boto.connect_ec2() if not self.sd.has_section('Credentials'): self.sd.add_section('Credentials') self.sd.set('Credentials', 'aws_access_key_id', ec2.aws_access_key_id) self.sd.set('Credentials', 'aws_secret_access_key', ec2.aws_secret_access_key) s = StringIO.StringIO() self.sd.write(s) rs = ec2.get_all_images([ami_id]) img = rs[0] r = img.run(user_data=s.getvalue(), key_name=self.options.keypair, max_count=self.options.num_instances, instance_type=instance_type, security_groups=[security_group]) print 'Starting AMI: %s' % ami_id print 'Reservation %s contains the following instances:' % r.id for i in r.instances: print '\t%s' % i.id def do_status(self): iq = self.sd.get_obj('input_queue') if iq: print 'The input_queue (%s) contains approximately %s messages' % (iq.id, iq.count()) ob = self.sd.get_obj('output_bucket') ib = self.sd.get_obj('input_bucket') if ob: if ib and ob.name == ib.name: return total = 0 for k in ob: total += 1 print 'The output_bucket (%s) contains %d keys' % (ob.name, total) def do_retrieve(self): if not self.options.path: self.parser.error('No path provided') if not os.path.exists(self.options.path): self.parser.error('Invalid path (%s)' % self.options.path) if not self.options.batch: self.parser.error('batch identifier is required for retrieve command') s = ResultProcessor(self.options.batch, self.sd) s.get_results(self.options.path, get_file=(not self.options.leave)) def do_batches(self): d = self.sd.get_obj('output_domain') if d: print 'Available Batches:' rs = d.query("['type'='Batch']") for item in rs: print ' %s' % item.name else: self.parser.error('No output_domain specified for service') def main(self): self.options, self.args = self.parser.parse_args() if self.options.help_commands: self.print_command_help() sys.exit(0) if len(self.args) != 2: self.parser.error("config_file and command are required") self.config_file = self.args[0] self.sd = ServiceDef(self.config_file) self.command = self.args[1] if hasattr(self, 'do_%s' % self.command): method = getattr(self, 'do_%s' % self.command) method() else: self.parser.error('command (%s) not recognized' % self.command) if __name__ == "__main__": bs = BS() bs.main() ================================================ FILE: deploy/third_party/boto-2.1.1/boto/services/message.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.sqs.message import MHMessage from boto.utils import get_ts from socket import gethostname import os, mimetypes, time class ServiceMessage(MHMessage): def for_key(self, key, params=None, bucket_name=None): if params: self.update(params) if key.path: t = os.path.split(key.path) self['OriginalLocation'] = t[0] self['OriginalFileName'] = t[1] mime_type = mimetypes.guess_type(t[1])[0] if mime_type == None: mime_type = 'application/octet-stream' self['Content-Type'] = mime_type s = os.stat(key.path) t = time.gmtime(s[7]) self['FileAccessedDate'] = get_ts(t) t = time.gmtime(s[8]) self['FileModifiedDate'] = get_ts(t) t = time.gmtime(s[9]) self['FileCreateDate'] = get_ts(t) else: self['OriginalFileName'] = key.name self['OriginalLocation'] = key.bucket.name self['ContentType'] = key.content_type self['Host'] = gethostname() if bucket_name: self['Bucket'] = bucket_name else: self['Bucket'] = key.bucket.name self['InputKey'] = key.name self['Size'] = key.size ================================================ FILE: deploy/third_party/boto-2.1.1/boto/services/result.py ================================================ #!/usr/bin/env python # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import os from datetime import datetime, timedelta from boto.utils import parse_ts import boto class ResultProcessor: LogFileName = 'log.csv' def __init__(self, batch_name, sd, mimetype_files=None): self.sd = sd self.batch = batch_name self.log_fp = None self.num_files = 0 self.total_time = 0 self.min_time = timedelta.max self.max_time = timedelta.min self.earliest_time = datetime.max self.latest_time = datetime.min self.queue = self.sd.get_obj('output_queue') self.domain = self.sd.get_obj('output_domain') def calculate_stats(self, msg): start_time = parse_ts(msg['Service-Read']) end_time = parse_ts(msg['Service-Write']) elapsed_time = end_time - start_time if elapsed_time > self.max_time: self.max_time = elapsed_time if elapsed_time < self.min_time: self.min_time = elapsed_time self.total_time += elapsed_time.seconds if start_time < self.earliest_time: self.earliest_time = start_time if end_time > self.latest_time: self.latest_time = end_time def log_message(self, msg, path): keys = msg.keys() keys.sort() if not self.log_fp: self.log_fp = open(os.path.join(path, self.LogFileName), 'a') line = ','.join(keys) self.log_fp.write(line+'\n') values = [] for key in keys: value = msg[key] if value.find(',') > 0: value = '"%s"' % value values.append(value) line = ','.join(values) self.log_fp.write(line+'\n') def process_record(self, record, path, get_file=True): self.log_message(record, path) self.calculate_stats(record) outputs = record['OutputKey'].split(',') if record.has_key('OutputBucket'): bucket = boto.lookup('s3', record['OutputBucket']) else: bucket = boto.lookup('s3', record['Bucket']) for output in outputs: if get_file: key_name = output.split(';')[0] key = bucket.lookup(key_name) file_name = os.path.join(path, key_name) print 'retrieving file: %s to %s' % (key_name, file_name) key.get_contents_to_filename(file_name) self.num_files += 1 def get_results_from_queue(self, path, get_file=True, delete_msg=True): m = self.queue.read() while m: if m.has_key('Batch') and m['Batch'] == self.batch: self.process_record(m, path, get_file) if delete_msg: self.queue.delete_message(m) m = self.queue.read() def get_results_from_domain(self, path, get_file=True): rs = self.domain.query("['Batch'='%s']" % self.batch) for item in rs: self.process_record(item, path, get_file) def get_results_from_bucket(self, path): bucket = self.sd.get_obj('output_bucket') if bucket: print 'No output queue or domain, just retrieving files from output_bucket' for key in bucket: file_name = os.path.join(path, key) print 'retrieving file: %s to %s' % (key, file_name) key.get_contents_to_filename(file_name) self.num_files + 1 def get_results(self, path, get_file=True, delete_msg=True): if not os.path.isdir(path): os.mkdir(path) if self.queue: self.get_results_from_queue(path, get_file) elif self.domain: self.get_results_from_domain(path, get_file) else: self.get_results_from_bucket(path) if self.log_fp: self.log_fp.close() print '%d results successfully retrieved.' % self.num_files if self.num_files > 0: self.avg_time = float(self.total_time)/self.num_files print 'Minimum Processing Time: %d' % self.min_time.seconds print 'Maximum Processing Time: %d' % self.max_time.seconds print 'Average Processing Time: %f' % self.avg_time self.elapsed_time = self.latest_time-self.earliest_time print 'Elapsed Time: %d' % self.elapsed_time.seconds tput = 1.0 / ((self.elapsed_time.seconds/60.0) / self.num_files) print 'Throughput: %f transactions / minute' % tput ================================================ FILE: deploy/third_party/boto-2.1.1/boto/services/service.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import boto from boto.services.message import ServiceMessage from boto.services.servicedef import ServiceDef from boto.pyami.scriptbase import ScriptBase from boto.utils import get_ts import time import os import mimetypes class Service(ScriptBase): # Time required to process a transaction ProcessingTime = 60 def __init__(self, config_file=None, mimetype_files=None): ScriptBase.__init__(self, config_file) self.name = self.__class__.__name__ self.working_dir = boto.config.get('Pyami', 'working_dir') self.sd = ServiceDef(config_file) self.retry_count = self.sd.getint('retry_count', 5) self.loop_delay = self.sd.getint('loop_delay', 30) self.processing_time = self.sd.getint('processing_time', 60) self.input_queue = self.sd.get_obj('input_queue') self.output_queue = self.sd.get_obj('output_queue') self.output_domain = self.sd.get_obj('output_domain') if mimetype_files: mimetypes.init(mimetype_files) def split_key(key): if key.find(';') < 0: t = (key, '') else: key, type = key.split(';') label, mtype = type.split('=') t = (key, mtype) return t def read_message(self): boto.log.info('read_message') message = self.input_queue.read(self.processing_time) if message: boto.log.info(message.get_body()) key = 'Service-Read' message[key] = get_ts() return message # retrieve the source file from S3 def get_file(self, message): bucket_name = message['Bucket'] key_name = message['InputKey'] file_name = os.path.join(self.working_dir, message.get('OriginalFileName', 'in_file')) boto.log.info('get_file: %s/%s to %s' % (bucket_name, key_name, file_name)) bucket = boto.lookup('s3', bucket_name) key = bucket.new_key(key_name) key.get_contents_to_filename(os.path.join(self.working_dir, file_name)) return file_name # process source file, return list of output files def process_file(self, in_file_name, msg): return [] # store result file in S3 def put_file(self, bucket_name, file_path, key_name=None): boto.log.info('putting file %s as %s.%s' % (file_path, bucket_name, key_name)) bucket = boto.lookup('s3', bucket_name) key = bucket.new_key(key_name) key.set_contents_from_filename(file_path) return key def save_results(self, results, input_message, output_message): output_keys = [] for file, type in results: if input_message.has_key('OutputBucket'): output_bucket = input_message['OutputBucket'] else: output_bucket = input_message['Bucket'] key_name = os.path.split(file)[1] key = self.put_file(output_bucket, file, key_name) output_keys.append('%s;type=%s' % (key.name, type)) output_message['OutputKey'] = ','.join(output_keys) # write message to each output queue def write_message(self, message): message['Service-Write'] = get_ts() message['Server'] = self.name if os.environ.has_key('HOSTNAME'): message['Host'] = os.environ['HOSTNAME'] else: message['Host'] = 'unknown' message['Instance-ID'] = self.instance_id if self.output_queue: boto.log.info('Writing message to SQS queue: %s' % self.output_queue.id) self.output_queue.write(message) if self.output_domain: boto.log.info('Writing message to SDB domain: %s' % self.output_domain.name) item_name = '/'.join([message['Service-Write'], message['Bucket'], message['InputKey']]) self.output_domain.put_attributes(item_name, message) # delete message from input queue def delete_message(self, message): boto.log.info('deleting message from %s' % self.input_queue.id) self.input_queue.delete_message(message) # to clean up any files, etc. after each iteration def cleanup(self): pass def shutdown(self): on_completion = self.sd.get('on_completion', 'shutdown') if on_completion == 'shutdown': if self.instance_id: time.sleep(60) c = boto.connect_ec2() c.terminate_instances([self.instance_id]) def main(self, notify=False): self.notify('Service: %s Starting' % self.name) empty_reads = 0 while self.retry_count < 0 or empty_reads < self.retry_count: try: input_message = self.read_message() if input_message: empty_reads = 0 output_message = ServiceMessage(None, input_message.get_body()) input_file = self.get_file(input_message) results = self.process_file(input_file, output_message) self.save_results(results, input_message, output_message) self.write_message(output_message) self.delete_message(input_message) self.cleanup() else: empty_reads += 1 time.sleep(self.loop_delay) except Exception: boto.log.exception('Service Failed') empty_reads += 1 self.notify('Service: %s Shutting Down' % self.name) self.shutdown() ================================================ FILE: deploy/third_party/boto-2.1.1/boto/services/servicedef.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.pyami.config import Config from boto.services.message import ServiceMessage import boto class ServiceDef(Config): def __init__(self, config_file, aws_access_key_id=None, aws_secret_access_key=None): Config.__init__(self, config_file) self.aws_access_key_id = aws_access_key_id self.aws_secret_access_key = aws_secret_access_key script = Config.get(self, 'Pyami', 'scripts') if script: self.name = script.split('.')[-1] else: self.name = None def get(self, name, default=None): return Config.get(self, self.name, name, default) def has_option(self, option): return Config.has_option(self, self.name, option) def getint(self, option, default=0): try: val = Config.get(self, self.name, option) val = int(val) except: val = int(default) return val def getbool(self, option, default=False): try: val = Config.get(self, self.name, option) if val.lower() == 'true': val = True else: val = False except: val = default return val def get_obj(self, name): """ Returns the AWS object associated with a given option. The heuristics used are a bit lame. If the option name contains the word 'bucket' it is assumed to be an S3 bucket, if the name contains the word 'queue' it is assumed to be an SQS queue and if it contains the word 'domain' it is assumed to be a SimpleDB domain. If the option name specified does not exist in the config file or if the AWS object cannot be retrieved this returns None. """ val = self.get(name) if not val: return None if name.find('queue') >= 0: obj = boto.lookup('sqs', val) if obj: obj.set_message_class(ServiceMessage) elif name.find('bucket') >= 0: obj = boto.lookup('s3', val) elif name.find('domain') >= 0: obj = boto.lookup('sdb', val) else: obj = None return obj ================================================ FILE: deploy/third_party/boto-2.1.1/boto/services/sonofmmm.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import boto from boto.services.service import Service from boto.services.message import ServiceMessage import os import mimetypes class SonOfMMM(Service): def __init__(self, config_file=None): Service.__init__(self, config_file) self.log_file = '%s.log' % self.instance_id self.log_path = os.path.join(self.working_dir, self.log_file) boto.set_file_logger(self.name, self.log_path) if self.sd.has_option('ffmpeg_args'): self.command = '/usr/local/bin/ffmpeg ' + self.sd.get('ffmpeg_args') else: self.command = '/usr/local/bin/ffmpeg -y -i %s %s' self.output_mimetype = self.sd.get('output_mimetype') if self.sd.has_option('output_ext'): self.output_ext = self.sd.get('output_ext') else: self.output_ext = mimetypes.guess_extension(self.output_mimetype) self.output_bucket = self.sd.get_obj('output_bucket') self.input_bucket = self.sd.get_obj('input_bucket') # check to see if there are any messages queue # if not, create messages for all files in input_bucket m = self.input_queue.read(1) if not m: self.queue_files() def queue_files(self): boto.log.info('Queueing files from %s' % self.input_bucket.name) for key in self.input_bucket: boto.log.info('Queueing %s' % key.name) m = ServiceMessage() if self.output_bucket: d = {'OutputBucket' : self.output_bucket.name} else: d = None m.for_key(key, d) self.input_queue.write(m) def process_file(self, in_file_name, msg): base, ext = os.path.splitext(in_file_name) out_file_name = os.path.join(self.working_dir, base+self.output_ext) command = self.command % (in_file_name, out_file_name) boto.log.info('running:\n%s' % command) status = self.run(command) if status == 0: return [(out_file_name, self.output_mimetype)] else: return [] def shutdown(self): if os.path.isfile(self.log_path): if self.output_bucket: key = self.output_bucket.new_key(self.log_file) key.set_contents_from_filename(self.log_path) Service.shutdown(self) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/services/submit.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import time import os class Submitter: def __init__(self, sd): self.sd = sd self.input_bucket = self.sd.get_obj('input_bucket') self.output_bucket = self.sd.get_obj('output_bucket') self.output_domain = self.sd.get_obj('output_domain') self.queue = self.sd.get_obj('input_queue') def get_key_name(self, fullpath, prefix): key_name = fullpath[len(prefix):] l = key_name.split(os.sep) return '/'.join(l) def write_message(self, key, metadata): if self.queue: m = self.queue.new_message() m.for_key(key, metadata) if self.output_bucket: m['OutputBucket'] = self.output_bucket.name self.queue.write(m) def submit_file(self, path, metadata=None, cb=None, num_cb=0, prefix='/'): if not metadata: metadata = {} key_name = self.get_key_name(path, prefix) k = self.input_bucket.new_key(key_name) k.update_metadata(metadata) k.set_contents_from_filename(path, replace=False, cb=cb, num_cb=num_cb) self.write_message(k, metadata) def submit_path(self, path, tags=None, ignore_dirs=None, cb=None, num_cb=0, status=False, prefix='/'): path = os.path.expanduser(path) path = os.path.expandvars(path) path = os.path.abspath(path) total = 0 metadata = {} if tags: metadata['Tags'] = tags l = [] for t in time.gmtime(): l.append(str(t)) metadata['Batch'] = '_'.join(l) if self.output_domain: self.output_domain.put_attributes(metadata['Batch'], {'type' : 'Batch'}) if os.path.isdir(path): for root, dirs, files in os.walk(path): if ignore_dirs: for ignore in ignore_dirs: if ignore in dirs: dirs.remove(ignore) for file in files: fullpath = os.path.join(root, file) if status: print 'Submitting %s' % fullpath self.submit_file(fullpath, metadata, cb, num_cb, prefix) total += 1 elif os.path.isfile(path): self.submit_file(path, metadata, cb, num_cb) total += 1 else: print 'problem with %s' % path return (metadata['Batch'], total) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ses/__init__.py ================================================ # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 Harry Marr http://hmarr.com/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from connection import SESConnection from boto.regioninfo import RegionInfo def regions(): """ Get all available regions for the SES service. :rtype: list :return: A list of :class:`boto.regioninfo.RegionInfo` instances """ return [RegionInfo(name='us-east-1', endpoint='email.us-east-1.amazonaws.com', connection_cls=SESConnection)] def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.sns.connection.SESConnection`. :type: str :param region_name: The name of the region to connect to. :rtype: :class:`boto.sns.connection.SESConnection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ for region in regions(): if region.name == region_name: return region.connect(**kw_params) return None def get_region(region_name, **kw_params): """ Find and return a :class:`boto.regioninfo.RegionInfo` object given a region name. :type: str :param: The name of the region. :rtype: :class:`boto.regioninfo.RegionInfo` :return: The RegionInfo object for the given region or None if an invalid region name is provided. """ for region in regions(**kw_params): if region.name == region_name: return region return None ================================================ FILE: deploy/third_party/boto-2.1.1/boto/ses/connection.py ================================================ # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 Harry Marr http://hmarr.com/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.connection import AWSAuthConnection from boto.exception import BotoServerError from boto.regioninfo import RegionInfo import boto import boto.jsonresponse import urllib import base64 class SESConnection(AWSAuthConnection): ResponseError = BotoServerError DefaultRegionName = 'us-east-1' DefaultRegionEndpoint = 'email.us-east-1.amazonaws.com' APIVersion = '2010-12-01' def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, region=None, path='/'): if not region: region = RegionInfo(self, self.DefaultRegionName, self.DefaultRegionEndpoint) self.region = region AWSAuthConnection.__init__(self, self.region.endpoint, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, debug, https_connection_factory, path) def _required_auth_capability(self): return ['ses'] def _build_list_params(self, params, items, label): """Add an AWS API-compatible parameter list to a dictionary. :type params: dict :param params: The parameter dictionary :type items: list :param items: Items to be included in the list :type label: string :param label: The parameter list's name """ if isinstance(items, basestring): items = [items] for i in range(1, len(items) + 1): params['%s.%d' % (label, i)] = items[i - 1] def _make_request(self, action, params=None): """Make a call to the SES API. :type action: string :param action: The API method to use (e.g. SendRawEmail) :type params: dict :param params: Parameters that will be sent as POST data with the API call. """ ct = 'application/x-www-form-urlencoded; charset=UTF-8' headers = {'Content-Type': ct} params = params or {} params['Action'] = action for k, v in params.items(): if isinstance(v, unicode): # UTF-8 encode only if it's Unicode params[k] = v.encode('utf-8') response = super(SESConnection, self).make_request( 'POST', '/', headers=headers, data=urllib.urlencode(params) ) body = response.read() if response.status == 200: list_markers = ('VerifiedEmailAddresses', 'SendDataPoints') e = boto.jsonresponse.Element(list_marker=list_markers) h = boto.jsonresponse.XmlHandler(e, None) h.parse(body) return e else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def send_email(self, source, subject, body, to_addresses, cc_addresses=None, bcc_addresses=None, format='text', reply_addresses=None, return_path=None, text_body=None, html_body=None): """Composes an email message based on input data, and then immediately queues the message for sending. :type source: string :param source: The sender's email address. :type subject: string :param subject: The subject of the message: A short summary of the content, which will appear in the recipient's inbox. :type body: string :param body: The message body. :type to_addresses: list of strings or string :param to_addresses: The To: field(s) of the message. :type cc_addresses: list of strings or string :param cc_addresses: The CC: field(s) of the message. :type bcc_addresses: list of strings or string :param bcc_addresses: The BCC: field(s) of the message. :type format: string :param format: The format of the message's body, must be either "text" or "html". :type reply_addresses: list of strings or string :param reply_addresses: The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply. :type return_path: string :param return_path: The email address to which bounce notifications are to be forwarded. If the message cannot be delivered to the recipient, then an error message will be returned from the recipient's ISP; this message will then be forwarded to the email address specified by the ReturnPath parameter. :type text_body: string :param text_body: The text body to send with this email. :type html_body: string :param html_body: The html body to send with this email. """ format = format.lower().strip() if body is not None: if format == "text": if text_body is not None: raise Warning("You've passed in both a body and a text_body; please choose one or the other.") text_body = body else: if html_body is not None: raise Warning("You've passed in both a body and an html_body; please choose one or the other.") html_body = body params = { 'Source': source, 'Message.Subject.Data': subject, } if return_path: params['ReturnPath'] = return_path if html_body is not None: params['Message.Body.Html.Data'] = html_body if text_body is not None: params['Message.Body.Text.Data'] = text_body if(format not in ("text","html")): raise ValueError("'format' argument must be 'text' or 'html'") if(not (html_body or text_body)): raise ValueError("No text or html body found for mail") self._build_list_params(params, to_addresses, 'Destination.ToAddresses.member') if cc_addresses: self._build_list_params(params, cc_addresses, 'Destination.CcAddresses.member') if bcc_addresses: self._build_list_params(params, bcc_addresses, 'Destination.BccAddresses.member') if reply_addresses: self._build_list_params(params, reply_addresses, 'ReplyToAddresses.member') return self._make_request('SendEmail', params) def send_raw_email(self, raw_message, source=None, destinations=None): """Sends an email message, with header and content specified by the client. The SendRawEmail action is useful for sending multipart MIME emails, with attachments or inline content. The raw text of the message must comply with Internet email standards; otherwise, the message cannot be sent. :type source: string :param source: The sender's email address. Amazon's docs say: If you specify the Source parameter, then bounce notifications and complaints will be sent to this email address. This takes precedence over any Return-Path header that you might include in the raw text of the message. :type raw_message: string :param raw_message: The raw text of the message. The client is responsible for ensuring the following: - Message must contain a header and a body, separated by a blank line. - All required header fields must be present. - Each part of a multipart MIME message must be formatted properly. - MIME content types must be among those supported by Amazon SES. Refer to the Amazon SES Developer Guide for more details. - Content must be base64-encoded, if MIME requires it. :type destinations: list of strings or string :param destinations: A list of destinations for the message. """ params = { 'RawMessage.Data': base64.b64encode(raw_message), } if source: params['Source'] = source if destinations: self._build_list_params(params, destinations, 'Destinations.member') return self._make_request('SendRawEmail', params) def list_verified_email_addresses(self): """Fetch a list of the email addresses that have been verified. :rtype: dict :returns: A ListVerifiedEmailAddressesResponse structure. Note that keys must be unicode strings. """ return self._make_request('ListVerifiedEmailAddresses') def get_send_quota(self): """Fetches the user's current activity limits. :rtype: dict :returns: A GetSendQuotaResponse structure. Note that keys must be unicode strings. """ return self._make_request('GetSendQuota') def get_send_statistics(self): """Fetches the user's sending statistics. The result is a list of data points, representing the last two weeks of sending activity. Each data point in the list contains statistics for a 15-minute interval. :rtype: dict :returns: A GetSendStatisticsResponse structure. Note that keys must be unicode strings. """ return self._make_request('GetSendStatistics') def delete_verified_email_address(self, email_address): """Deletes the specified email address from the list of verified addresses. :type email_adddress: string :param email_address: The email address to be removed from the list of verified addreses. :rtype: dict :returns: A DeleteVerifiedEmailAddressResponse structure. Note that keys must be unicode strings. """ return self._make_request('DeleteVerifiedEmailAddress', { 'EmailAddress': email_address, }) def verify_email_address(self, email_address): """Verifies an email address. This action causes a confirmation email message to be sent to the specified address. :type email_adddress: string :param email_address: The email address to be verified. :rtype: dict :returns: A VerifyEmailAddressResponse structure. Note that keys must be unicode strings. """ return self._make_request('VerifyEmailAddress', { 'EmailAddress': email_address, }) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sns/__init__.py ================================================ # Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010-2011, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # this is here for backward compatibility # originally, the SNSConnection class was defined here from connection import SNSConnection from boto.regioninfo import RegionInfo def regions(): """ Get all available regions for the SNS service. :rtype: list :return: A list of :class:`boto.regioninfo.RegionInfo` instances """ return [RegionInfo(name='us-east-1', endpoint='sns.us-east-1.amazonaws.com', connection_cls=SNSConnection), RegionInfo(name='eu-west-1', endpoint='sns.eu-west-1.amazonaws.com', connection_cls=SNSConnection), RegionInfo(name='us-west-1', endpoint='sns.us-west-1.amazonaws.com', connection_cls=SNSConnection), RegionInfo(name='ap-northeast-1', endpoint='sns.ap-northeast-1.amazonaws.com', connection_cls=SNSConnection), RegionInfo(name='ap-southeast-1', endpoint='sns.ap-southeast-1.amazonaws.com', connection_cls=SNSConnection), ] def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.sns.connection.SNSConnection`. :type: str :param region_name: The name of the region to connect to. :rtype: :class:`boto.sns.connection.SNSConnection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ for region in regions(): if region.name == region_name: return region.connect(**kw_params) return None def get_region(region_name, **kw_params): """ Find and return a :class:`boto.regioninfo.RegionInfo` object given a region name. :type: str :param: The name of the region. :rtype: :class:`boto.regioninfo.RegionInfo` :return: The RegionInfo object for the given region or None if an invalid region name is provided. """ for region in regions(**kw_params): if region.name == region_name: return region return None ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sns/connection.py ================================================ # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.connection import AWSQueryConnection from boto.regioninfo import RegionInfo import boto import uuid try: import simplejson as json except ImportError: import json class SNSConnection(AWSQueryConnection): DefaultRegionName = 'us-east-1' DefaultRegionEndpoint = 'sns.us-east-1.amazonaws.com' APIVersion = '2010-03-31' def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, region=None, path='/', security_token=None): if not region: region = RegionInfo(self, self.DefaultRegionName, self.DefaultRegionEndpoint, connection_cls=SNSConnection) self.region = region AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, self.region.endpoint, debug, https_connection_factory, path, security_token=security_token) def _required_auth_capability(self): return ['sns'] def get_all_topics(self, next_token=None): """ :type next_token: string :param next_token: Token returned by the previous call to this method. """ params = {'ContentType' : 'JSON'} if next_token: params['NextToken'] = next_token response = self.make_request('ListTopics', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def get_topic_attributes(self, topic): """ Get attributes of a Topic :type topic: string :param topic: The ARN of the topic. """ params = {'ContentType' : 'JSON', 'TopicArn' : topic} response = self.make_request('GetTopicAttributes', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def set_topic_attributes(self, topic, attr_name, attr_value): """ Get attributes of a Topic :type topic: string :param topic: The ARN of the topic. :type attr_name: string :param attr_name: The name of the attribute you want to set. Only a subset of the topic's attributes are mutable. Valid values: Policy | DisplayName :type attr_value: string :param attr_value: The new value for the attribute. """ params = {'ContentType' : 'JSON', 'TopicArn' : topic, 'AttributeName' : attr_name, 'AttributeValue' : attr_value} response = self.make_request('SetTopicAttributes', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def add_permission(self, topic, label, account_ids, actions): """ Adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions. :type topic: string :param topic: The ARN of the topic. :type label: string :param label: A unique identifier for the new policy statement. :type account_ids: list of strings :param account_ids: The AWS account ids of the users who will be give access to the specified actions. :type actions: list of strings :param actions: The actions you want to allow for each of the specified principal(s). """ params = {'ContentType' : 'JSON', 'TopicArn' : topic, 'Label' : label} self.build_list_params(params, account_ids, 'AWSAccountId') self.build_list_params(params, actions, 'ActionName') response = self.make_request('AddPermission', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def remove_permission(self, topic, label): """ Removes a statement from a topic's access control policy. :type topic: string :param topic: The ARN of the topic. :type label: string :param label: A unique identifier for the policy statement to be removed. """ params = {'ContentType' : 'JSON', 'TopicArn' : topic, 'Label' : label} response = self.make_request('RemovePermission', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def create_topic(self, topic): """ Create a new Topic. :type topic: string :param topic: The name of the new topic. """ params = {'ContentType' : 'JSON', 'Name' : topic} response = self.make_request('CreateTopic', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def delete_topic(self, topic): """ Delete an existing topic :type topic: string :param topic: The ARN of the topic """ params = {'ContentType' : 'JSON', 'TopicArn' : topic} response = self.make_request('DeleteTopic', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def publish(self, topic, message, subject=None): """ Get properties of a Topic :type topic: string :param topic: The ARN of the new topic. :type message: string :param message: The message you want to send to the topic. Messages must be UTF-8 encoded strings and be at most 4KB in size. :type subject: string :param subject: Optional parameter to be used as the "Subject" line of the email notifications. """ params = {'ContentType' : 'JSON', 'TopicArn' : topic, 'Message' : message} if subject: params['Subject'] = subject response = self.make_request('Publish', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def subscribe(self, topic, protocol, endpoint): """ Subscribe to a Topic. :type topic: string :param topic: The name of the new topic. :type protocol: string :param protocol: The protocol used to communicate with the subscriber. Current choices are: email|email-json|http|https|sqs :type endpoint: string :param endpoint: The location of the endpoint for the subscriber. * For email, this would be a valid email address * For email-json, this would be a valid email address * For http, this would be a URL beginning with http * For https, this would be a URL beginning with https * For sqs, this would be the ARN of an SQS Queue """ params = {'ContentType' : 'JSON', 'TopicArn' : topic, 'Protocol' : protocol, 'Endpoint' : endpoint} response = self.make_request('Subscribe', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def subscribe_sqs_queue(self, topic, queue): """ Subscribe an SQS queue to a topic. This is convenience method that handles most of the complexity involved in using ans SQS queue as an endpoint for an SNS topic. To achieve this the following operations are performed: * The correct ARN is constructed for the SQS queue and that ARN is then subscribed to the topic. * A JSON policy document is contructed that grants permission to the SNS topic to send messages to the SQS queue. * This JSON policy is then associated with the SQS queue using the queue's set_attribute method. If the queue already has a policy associated with it, this process will add a Statement to that policy. If no policy exists, a new policy will be created. :type topic: string :param topic: The name of the new topic. :type queue: A boto Queue object :param queue: The queue you wish to subscribe to the SNS Topic. """ t = queue.id.split('/') q_arn = 'arn:aws:sqs:%s:%s:%s' % (queue.connection.region.name, t[1], t[2]) resp = self.subscribe(topic, 'sqs', q_arn) policy = queue.get_attributes('Policy') if 'Version' not in policy: policy['Version'] = '2008-10-17' if 'Statement' not in policy: policy['Statement'] = [] statement = {'Action' : 'SQS:SendMessage', 'Effect' : 'Allow', 'Principal' : {'AWS' : '*'}, 'Resource' : q_arn, 'Sid' : str(uuid.uuid4()), 'Condition' : {'StringLike' : {'aws:SourceArn' : topic}}} policy['Statement'].append(statement) queue.set_attribute('Policy', json.dumps(policy)) return resp def confirm_subscription(self, topic, token, authenticate_on_unsubscribe=False): """ Get properties of a Topic :type topic: string :param topic: The ARN of the new topic. :type token: string :param token: Short-lived token sent to and endpoint during the Subscribe operation. :type authenticate_on_unsubscribe: bool :param authenticate_on_unsubscribe: Optional parameter indicating that you wish to disable unauthenticated unsubscription of the subscription. """ params = {'ContentType' : 'JSON', 'TopicArn' : topic, 'Token' : token} if authenticate_on_unsubscribe: params['AuthenticateOnUnsubscribe'] = 'true' response = self.make_request('ConfirmSubscription', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def unsubscribe(self, subscription): """ Allows endpoint owner to delete subscription. Confirmation message will be delivered. :type subscription: string :param subscription: The ARN of the subscription to be deleted. """ params = {'ContentType' : 'JSON', 'SubscriptionArn' : subscription} response = self.make_request('Unsubscribe', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def get_all_subscriptions(self, next_token=None): """ Get list of all subscriptions. :type next_token: string :param next_token: Token returned by the previous call to this method. """ params = {'ContentType' : 'JSON'} if next_token: params['NextToken'] = next_token response = self.make_request('ListSubscriptions', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) def get_all_subscriptions_by_topic(self, topic, next_token=None): """ Get list of all subscriptions to a specific topic. :type topic: string :param topic: The ARN of the topic for which you wish to find subscriptions. :type next_token: string :param next_token: Token returned by the previous call to this method. """ params = {'ContentType' : 'JSON', 'TopicArn' : topic} if next_token: params['NextToken'] = next_token response = self.make_request('ListSubscriptionsByTopic', params, '/', 'GET') body = response.read() if response.status == 200: return json.loads(body) else: boto.log.error('%s %s' % (response.status, response.reason)) boto.log.error('%s' % body) raise self.ResponseError(response.status, response.reason, body) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sqs/__init__.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # from regioninfo import SQSRegionInfo def regions(): """ Get all available regions for the SQS service. :rtype: list :return: A list of :class:`boto.ec2.regioninfo.RegionInfo` """ return [SQSRegionInfo(name='us-east-1', endpoint='queue.amazonaws.com'), SQSRegionInfo(name='eu-west-1', endpoint='eu-west-1.queue.amazonaws.com'), SQSRegionInfo(name='us-west-1', endpoint='us-west-1.queue.amazonaws.com'), SQSRegionInfo(name='ap-northeast-1', endpoint='ap-northeast-1.queue.amazonaws.com'), SQSRegionInfo(name='ap-southeast-1', endpoint='ap-southeast-1.queue.amazonaws.com') ] def connect_to_region(region_name, **kw_params): for region in regions(): if region.name == region_name: return region.connect(**kw_params) return None ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sqs/attributes.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an SQS Attribute Name/Value set """ class Attributes(dict): def __init__(self, parent): self.parent = parent self.current_key = None self.current_value = None def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'Attribute': self[self.current_key] = self.current_value elif name == 'Name': self.current_key = value elif name == 'Value': self.current_value = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sqs/connection.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.connection import AWSQueryConnection from boto.sqs.regioninfo import SQSRegionInfo from boto.sqs.queue import Queue from boto.sqs.message import Message from boto.sqs.attributes import Attributes from boto.exception import SQSError class SQSConnection(AWSQueryConnection): """ A Connection to the SQS Service. """ DefaultRegionName = 'us-east-1' DefaultRegionEndpoint = 'queue.amazonaws.com' APIVersion = '2009-02-01' DefaultContentType = 'text/plain' ResponseError = SQSError def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, region=None, path='/', security_token=None): if not region: region = SQSRegionInfo(self, self.DefaultRegionName, self.DefaultRegionEndpoint) self.region = region AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, self.region.endpoint, debug, https_connection_factory, path, security_token=security_token) def _required_auth_capability(self): return ['sqs'] def create_queue(self, queue_name, visibility_timeout=None): """ Create an SQS Queue. :type queue_name: str or unicode :param queue_name: The name of the new queue. Names are scoped to an account and need to be unique within that account. Calling this method on an existing queue name will not return an error from SQS unless the value for visibility_timeout is different than the value of the existing queue of that name. This is still an expensive operation, though, and not the preferred way to check for the existence of a queue. See the :func:`boto.sqs.connection.SQSConnection.lookup` method. :type visibility_timeout: int :param visibility_timeout: The default visibility timeout for all messages written in the queue. This can be overridden on a per-message. :rtype: :class:`boto.sqs.queue.Queue` :return: The newly created queue. """ params = {'QueueName': queue_name} if visibility_timeout: params['DefaultVisibilityTimeout'] = '%d' % (visibility_timeout,) return self.get_object('CreateQueue', params, Queue) def delete_queue(self, queue, force_deletion=False): """ Delete an SQS Queue. :type queue: A Queue object :param queue: The SQS queue to be deleted :type force_deletion: Boolean :param force_deletion: Normally, SQS will not delete a queue that contains messages. However, if the force_deletion argument is True, the queue will be deleted regardless of whether there are messages in the queue or not. USE WITH CAUTION. This will delete all messages in the queue as well. :rtype: bool :return: True if the command succeeded, False otherwise """ return self.get_status('DeleteQueue', None, queue.id) def get_queue_attributes(self, queue, attribute='All'): """ Gets one or all attributes of a Queue :type queue: A Queue object :param queue: The SQS queue to be deleted :type attribute: str :type attribute: The specific attribute requested. If not supplied, the default is to return all attributes. Valid attributes are: ApproximateNumberOfMessages| ApproximateNumberOfMessagesNotVisible| VisibilityTimeout| CreatedTimestamp| LastModifiedTimestamp| Policy :rtype: :class:`boto.sqs.attributes.Attributes` :return: An Attributes object containing request value(s). """ params = {'AttributeName' : attribute} return self.get_object('GetQueueAttributes', params, Attributes, queue.id) def set_queue_attribute(self, queue, attribute, value): params = {'Attribute.Name' : attribute, 'Attribute.Value' : value} return self.get_status('SetQueueAttributes', params, queue.id) def receive_message(self, queue, number_messages=1, visibility_timeout=None, attributes=None): """ Read messages from an SQS Queue. :type queue: A Queue object :param queue: The Queue from which messages are read. :type number_messages: int :param number_messages: The maximum number of messages to read (default=1) :type visibility_timeout: int :param visibility_timeout: The number of seconds the message should remain invisible to other queue readers (default=None which uses the Queues default) :type attributes: str :param attributes: The name of additional attribute to return with response or All if you want all attributes. The default is to return no additional attributes. Valid values: All|SenderId|SentTimestamp| ApproximateReceiveCount| ApproximateFirstReceiveTimestamp :rtype: list :return: A list of :class:`boto.sqs.message.Message` objects. """ params = {'MaxNumberOfMessages' : number_messages} if visibility_timeout: params['VisibilityTimeout'] = visibility_timeout if attributes: self.build_list_params(params, attributes, 'AttributeName') return self.get_list('ReceiveMessage', params, [('Message', queue.message_class)], queue.id, queue) def delete_message(self, queue, message): """ Delete a message from a queue. :type queue: A :class:`boto.sqs.queue.Queue` object :param queue: The Queue from which messages are read. :type message: A :class:`boto.sqs.message.Message` object :param message: The Message to be deleted :rtype: bool :return: True if successful, False otherwise. """ params = {'ReceiptHandle' : message.receipt_handle} return self.get_status('DeleteMessage', params, queue.id) def delete_message_from_handle(self, queue, receipt_handle): """ Delete a message from a queue, given a receipt handle. :type queue: A :class:`boto.sqs.queue.Queue` object :param queue: The Queue from which messages are read. :type receipt_handle: str :param receipt_handle: The receipt handle for the message :rtype: bool :return: True if successful, False otherwise. """ params = {'ReceiptHandle' : receipt_handle} return self.get_status('DeleteMessage', params, queue.id) def send_message(self, queue, message_content): params = {'MessageBody' : message_content} return self.get_object('SendMessage', params, Message, queue.id, verb='POST') def change_message_visibility(self, queue, receipt_handle, visibility_timeout): """ Extends the read lock timeout for the specified message from the specified queue to the specified value. :type queue: A :class:`boto.sqs.queue.Queue` object :param queue: The Queue from which messages are read. :type receipt_handle: str :param queue: The receipt handle associated with the message whose visibility timeout will be changed. :type visibility_timeout: int :param visibility_timeout: The new value of the message's visibility timeout in seconds. """ params = {'ReceiptHandle' : receipt_handle, 'VisibilityTimeout' : visibility_timeout} return self.get_status('ChangeMessageVisibility', params, queue.id) def get_all_queues(self, prefix=''): params = {} if prefix: params['QueueNamePrefix'] = prefix return self.get_list('ListQueues', params, [('QueueUrl', Queue)]) def get_queue(self, queue_name): rs = self.get_all_queues(queue_name) for q in rs: if q.url.endswith(queue_name): return q return None lookup = get_queue # # Permissions methods # def add_permission(self, queue, label, aws_account_id, action_name): """ Add a permission to a queue. :type queue: :class:`boto.sqs.queue.Queue` :param queue: The queue object :type label: str or unicode :param label: A unique identification of the permission you are setting. Maximum of 80 characters ``[0-9a-zA-Z_-]`` Example, AliceSendMessage :type aws_account_id: str or unicode :param principal_id: The AWS account number of the principal who will be given permission. The principal must have an AWS account, but does not need to be signed up for Amazon SQS. For information about locating the AWS account identification. :type action_name: str or unicode :param action_name: The action. Valid choices are: \*|SendMessage|ReceiveMessage|DeleteMessage| ChangeMessageVisibility|GetQueueAttributes :rtype: bool :return: True if successful, False otherwise. """ params = {'Label': label, 'AWSAccountId' : aws_account_id, 'ActionName' : action_name} return self.get_status('AddPermission', params, queue.id) def remove_permission(self, queue, label): """ Remove a permission from a queue. :type queue: :class:`boto.sqs.queue.Queue` :param queue: The queue object :type label: str or unicode :param label: The unique label associated with the permission being removed. :rtype: bool :return: True if successful, False otherwise. """ params = {'Label': label} return self.get_status('RemovePermission', params, queue.id) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sqs/jsonmessage.py ================================================ # Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.sqs.message import MHMessage from boto.exception import SQSDecodeError import base64 try: import simplejson as json except ImportError: import json class JSONMessage(MHMessage): """ Acts like a dictionary but encodes it's data as a Base64 encoded JSON payload. """ def decode(self, value): try: value = base64.b64decode(value) value = json.loads(value) except: raise SQSDecodeError('Unable to decode message', self) return value def encode(self, value): value = json.dumps(value) return base64.b64encode(value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sqs/message.py ================================================ # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ SQS Message A Message represents the data stored in an SQS queue. The rules for what is allowed within an SQS Message are here: http://docs.amazonwebservices.com/AWSSimpleQueueService/2008-01-01/SQSDeveloperGuide/Query_QuerySendMessage.html So, at it's simplest level a Message just needs to allow a developer to store bytes in it and get the bytes back out. However, to allow messages to have richer semantics, the Message class must support the following interfaces: The constructor for the Message class must accept a keyword parameter "queue" which is an instance of a boto Queue object and represents the queue that the message will be stored in. The default value for this parameter is None. The constructor for the Message class must accept a keyword parameter "body" which represents the content or body of the message. The format of this parameter will depend on the behavior of the particular Message subclass. For example, if the Message subclass provides dictionary-like behavior to the user the body passed to the constructor should be a dict-like object that can be used to populate the initial state of the message. The Message class must provide an encode method that accepts a value of the same type as the body parameter of the constructor and returns a string of characters that are able to be stored in an SQS message body (see rules above). The Message class must provide a decode method that accepts a string of characters that can be stored (and probably were stored!) in an SQS message and return an object of a type that is consistent with the "body" parameter accepted on the class constructor. The Message class must provide a __len__ method that will return the size of the encoded message that would be stored in SQS based on the current state of the Message object. The Message class must provide a get_body method that will return the body of the message in the same format accepted in the constructor of the class. The Message class must provide a set_body method that accepts a message body in the same format accepted by the constructor of the class. This method should alter to the internal state of the Message object to reflect the state represented in the message body parameter. The Message class must provide a get_body_encoded method that returns the current body of the message in the format in which it would be stored in SQS. """ import base64 import StringIO from boto.sqs.attributes import Attributes from boto.exception import SQSDecodeError class RawMessage: """ Base class for SQS messages. RawMessage does not encode the message in any way. Whatever you store in the body of the message is what will be written to SQS and whatever is returned from SQS is stored directly into the body of the message. """ def __init__(self, queue=None, body=''): self.queue = queue self.set_body(body) self.id = None self.receipt_handle = None self.md5 = None self.attributes = Attributes(self) def __len__(self): return len(self.encode(self._body)) def startElement(self, name, attrs, connection): if name == 'Attribute': return self.attributes return None def endElement(self, name, value, connection): if name == 'Body': self.set_body(self.decode(value)) elif name == 'MessageId': self.id = value elif name == 'ReceiptHandle': self.receipt_handle = value elif name == 'MD5OfMessageBody': self.md5 = value else: setattr(self, name, value) def encode(self, value): """Transform body object into serialized byte array format.""" return value def decode(self, value): """Transform seralized byte array into any object.""" return value def set_body(self, body): """Override the current body for this object, using decoded format.""" self._body = body def get_body(self): return self._body def get_body_encoded(self): """ This method is really a semi-private method used by the Queue.write method when writing the contents of the message to SQS. You probably shouldn't need to call this method in the normal course of events. """ return self.encode(self.get_body()) def delete(self): if self.queue: return self.queue.delete_message(self) def change_visibility(self, visibility_timeout): if self.queue: self.queue.connection.change_message_visibility(self.queue, self.receipt_handle, visibility_timeout) class Message(RawMessage): """ The default Message class used for SQS queues. This class automatically encodes/decodes the message body using Base64 encoding to avoid any illegal characters in the message body. See: http://developer.amazonwebservices.com/connect/thread.jspa?messageID=49680%EC%88%90 for details on why this is a good idea. The encode/decode is meant to be transparent to the end-user. """ def encode(self, value): return base64.b64encode(value) def decode(self, value): try: value = base64.b64decode(value) except: raise SQSDecodeError('Unable to decode message', self) return value class MHMessage(Message): """ The MHMessage class provides a message that provides RFC821-like headers like this: HeaderName: HeaderValue The encoding/decoding of this is handled automatically and after the message body has been read, the message instance can be treated like a mapping object, i.e. m['HeaderName'] would return 'HeaderValue'. """ def __init__(self, queue=None, body=None, xml_attrs=None): if body == None or body == '': body = {} Message.__init__(self, queue, body) def decode(self, value): try: msg = {} fp = StringIO.StringIO(value) line = fp.readline() while line: delim = line.find(':') key = line[0:delim] value = line[delim+1:].strip() msg[key.strip()] = value.strip() line = fp.readline() except: raise SQSDecodeError('Unable to decode message', self) return msg def encode(self, value): s = '' for item in value.items(): s = s + '%s: %s\n' % (item[0], item[1]) return s def __getitem__(self, key): if self._body.has_key(key): return self._body[key] else: raise KeyError(key) def __setitem__(self, key, value): self._body[key] = value self.set_body(self._body) def keys(self): return self._body.keys() def values(self): return self._body.values() def items(self): return self._body.items() def has_key(self, key): return self._body.has_key(key) def update(self, d): self._body.update(d) self.set_body(self._body) def get(self, key, default=None): return self._body.get(key, default) class EncodedMHMessage(MHMessage): """ The EncodedMHMessage class provides a message that provides RFC821-like headers like this: HeaderName: HeaderValue This variation encodes/decodes the body of the message in base64 automatically. The message instance can be treated like a mapping object, i.e. m['HeaderName'] would return 'HeaderValue'. """ def decode(self, value): try: value = base64.b64decode(value) except: raise SQSDecodeError('Unable to decode message', self) return MHMessage.decode(self, value) def encode(self, value): value = MHMessage.encode(self, value) return base64.b64encode(value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sqs/queue.py ================================================ # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an SQS Queue """ import urlparse from boto.sqs.message import Message class Queue: def __init__(self, connection=None, url=None, message_class=Message): self.connection = connection self.url = url self.message_class = message_class self.visibility_timeout = None def _id(self): if self.url: val = urlparse.urlparse(self.url)[2] else: val = self.url return val id = property(_id) def _name(self): if self.url: val = urlparse.urlparse(self.url)[2].split('/')[2] else: val = self.url return val name = property(_name) def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'QueueUrl': self.url = value elif name == 'VisibilityTimeout': self.visibility_timeout = int(value) else: setattr(self, name, value) def set_message_class(self, message_class): """ Set the message class that should be used when instantiating messages read from the queue. By default, the class boto.sqs.message.Message is used but this can be overriden with any class that behaves like a message. :type message_class: Message-like class :param message_class: The new Message class """ self.message_class = message_class def get_attributes(self, attributes='All'): """ Retrieves attributes about this queue object and returns them in an Attribute instance (subclass of a Dictionary). :type attributes: string :param attributes: String containing one of: ApproximateNumberOfMessages, ApproximateNumberOfMessagesNotVisible, VisibilityTimeout, CreatedTimestamp, LastModifiedTimestamp, Policy :rtype: Attribute object :return: An Attribute object which is a mapping type holding the requested name/value pairs """ return self.connection.get_queue_attributes(self, attributes) def set_attribute(self, attribute, value): """ Set a new value for an attribute of the Queue. :type attribute: String :param attribute: The name of the attribute you want to set. The only valid value at this time is: VisibilityTimeout :type value: int :param value: The new value for the attribute. For VisibilityTimeout the value must be an integer number of seconds from 0 to 86400. :rtype: bool :return: True if successful, otherwise False. """ return self.connection.set_queue_attribute(self, attribute, value) def get_timeout(self): """ Get the visibility timeout for the queue. :rtype: int :return: The number of seconds as an integer. """ a = self.get_attributes('VisibilityTimeout') return int(a['VisibilityTimeout']) def set_timeout(self, visibility_timeout): """ Set the visibility timeout for the queue. :type visibility_timeout: int :param visibility_timeout: The desired timeout in seconds """ retval = self.set_attribute('VisibilityTimeout', visibility_timeout) if retval: self.visibility_timeout = visibility_timeout return retval def add_permission(self, label, aws_account_id, action_name): """ Add a permission to a queue. :type label: str or unicode :param label: A unique identification of the permission you are setting. Maximum of 80 characters ``[0-9a-zA-Z_-]`` Example, AliceSendMessage :type aws_account_id: str or unicode :param principal_id: The AWS account number of the principal who will be given permission. The principal must have an AWS account, but does not need to be signed up for Amazon SQS. For information about locating the AWS account identification. :type action_name: str or unicode :param action_name: The action. Valid choices are: \*|SendMessage|ReceiveMessage|DeleteMessage| ChangeMessageVisibility|GetQueueAttributes :rtype: bool :return: True if successful, False otherwise. """ return self.connection.add_permission(self, label, aws_account_id, action_name) def remove_permission(self, label): """ Remove a permission from a queue. :type label: str or unicode :param label: The unique label associated with the permission being removed. :rtype: bool :return: True if successful, False otherwise. """ return self.connection.remove_permission(self, label) def read(self, visibility_timeout=None): """ Read a single message from the queue. :type visibility_timeout: int :param visibility_timeout: The timeout for this message in seconds :rtype: :class:`boto.sqs.message.Message` :return: A single message or None if queue is empty """ rs = self.get_messages(1, visibility_timeout) if len(rs) == 1: return rs[0] else: return None def write(self, message): """ Add a single message to the queue. :type message: Message :param message: The message to be written to the queue :rtype: :class:`boto.sqs.message.Message` :return: The :class:`boto.sqs.message.Message` object that was written. """ new_msg = self.connection.send_message(self, message.get_body_encoded()) message.id = new_msg.id message.md5 = new_msg.md5 return message def new_message(self, body=''): """ Create new message of appropriate class. :type body: message body :param body: The body of the newly created message (optional). :rtype: :class:`boto.sqs.message.Message` :return: A new Message object """ m = self.message_class(self, body) m.queue = self return m # get a variable number of messages, returns a list of messages def get_messages(self, num_messages=1, visibility_timeout=None, attributes=None): """ Get a variable number of messages. :type num_messages: int :param num_messages: The maximum number of messages to read from the queue. :type visibility_timeout: int :param visibility_timeout: The VisibilityTimeout for the messages read. :type attributes: str :param attributes: The name of additional attribute to return with response or All if you want all attributes. The default is to return no additional attributes. Valid values: All SenderId SentTimestamp ApproximateReceiveCount ApproximateFirstReceiveTimestamp :rtype: list :return: A list of :class:`boto.sqs.message.Message` objects. """ return self.connection.receive_message(self, number_messages=num_messages, visibility_timeout=visibility_timeout, attributes=attributes) def delete_message(self, message): """ Delete a message from the queue. :type message: :class:`boto.sqs.message.Message` :param message: The :class:`boto.sqs.message.Message` object to delete. :rtype: bool :return: True if successful, False otherwise """ return self.connection.delete_message(self, message) def delete(self): """ Delete the queue. """ return self.connection.delete_queue(self) def clear(self, page_size=10, vtimeout=10): """Utility function to remove all messages from a queue""" n = 0 l = self.get_messages(page_size, vtimeout) while l: for m in l: self.delete_message(m) n += 1 l = self.get_messages(page_size, vtimeout) return n def count(self, page_size=10, vtimeout=10): """ Utility function to count the number of messages in a queue. Note: This function now calls GetQueueAttributes to obtain an 'approximate' count of the number of messages in a queue. """ a = self.get_attributes('ApproximateNumberOfMessages') return int(a['ApproximateNumberOfMessages']) def count_slow(self, page_size=10, vtimeout=10): """ Deprecated. This is the old 'count' method that actually counts the messages by reading them all. This gives an accurate count but is very slow for queues with non-trivial number of messasges. Instead, use get_attribute('ApproximateNumberOfMessages') to take advantage of the new SQS capability. This is retained only for the unit tests. """ n = 0 l = self.get_messages(page_size, vtimeout) while l: for m in l: n += 1 l = self.get_messages(page_size, vtimeout) return n def dump(self, file_name, page_size=10, vtimeout=10, sep='\n'): """Utility function to dump the messages in a queue to a file NOTE: Page size must be < 10 else SQS errors""" fp = open(file_name, 'wb') n = 0 l = self.get_messages(page_size, vtimeout) while l: for m in l: fp.write(m.get_body()) if sep: fp.write(sep) n += 1 l = self.get_messages(page_size, vtimeout) fp.close() return n def save_to_file(self, fp, sep='\n'): """ Read all messages from the queue and persist them to file-like object. Messages are written to the file and the 'sep' string is written in between messages. Messages are deleted from the queue after being written to the file. Returns the number of messages saved. """ n = 0 m = self.read() while m: n += 1 fp.write(m.get_body()) if sep: fp.write(sep) self.delete_message(m) m = self.read() return n def save_to_filename(self, file_name, sep='\n'): """ Read all messages from the queue and persist them to local file. Messages are written to the file and the 'sep' string is written in between messages. Messages are deleted from the queue after being written to the file. Returns the number of messages saved. """ fp = open(file_name, 'wb') n = self.save_to_file(fp, sep) fp.close() return n # for backwards compatibility save = save_to_filename def save_to_s3(self, bucket): """ Read all messages from the queue and persist them to S3. Messages are stored in the S3 bucket using a naming scheme of:: / Messages are deleted from the queue after being saved to S3. Returns the number of messages saved. """ n = 0 m = self.read() while m: n += 1 key = bucket.new_key('%s/%s' % (self.id, m.id)) key.set_contents_from_string(m.get_body()) self.delete_message(m) m = self.read() return n def load_from_s3(self, bucket, prefix=None): """ Load messages previously saved to S3. """ n = 0 if prefix: prefix = '%s/' % prefix else: prefix = '%s/' % self.id[1:] rs = bucket.list(prefix=prefix) for key in rs: n += 1 m = self.new_message(key.get_contents_as_string()) self.write(m) return n def load_from_file(self, fp, sep='\n'): """Utility function to load messages from a file-like object to a queue""" n = 0 body = '' l = fp.readline() while l: if l == sep: m = Message(self, body) self.write(m) n += 1 print 'writing message %d' % n body = '' else: body = body + l l = fp.readline() return n def load_from_filename(self, file_name, sep='\n'): """Utility function to load messages from a local filename to a queue""" fp = open(file_name, 'rb') n = self.load_from_file(fp, sep) fp.close() return n # for backward compatibility load = load_from_filename ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sqs/regioninfo.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # from boto.regioninfo import RegionInfo class SQSRegionInfo(RegionInfo): def __init__(self, connection=None, name=None, endpoint=None): from boto.sqs.connection import SQSConnection RegionInfo.__init__(self, connection, name, endpoint, SQSConnection) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/storage_uri.py ================================================ # Copyright 2010 Google Inc. # Copyright (c) 2011, Nexenta Systems Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. import boto import os from boto.exception import BotoClientError from boto.exception import InvalidUriError class StorageUri(object): """ Base class for representing storage provider-independent bucket and object name with a shorthand URI-like syntax. This is an abstract class: the constructor cannot be called (throws an exception if you try). """ connection = None # Optional args that can be set from one of the concrete subclass # constructors, to change connection behavior (e.g., to override # https_connection_factory). connection_args = None def __init__(self): """Uncallable constructor on abstract base StorageUri class. """ raise BotoClientError('Attempt to instantiate abstract StorageUri ' 'class') def __repr__(self): """Returns string representation of URI.""" return self.uri def equals(self, uri): """Returns true if two URIs are equal.""" return self.uri == uri.uri def check_response(self, resp, level, uri): if resp is None: raise InvalidUriError('Attempt to get %s for "%s" failed. This ' 'probably indicates the URI is invalid' % (level, uri)) def connect(self, access_key_id=None, secret_access_key=None, **kwargs): """ Opens a connection to appropriate provider, depending on provider portion of URI. Requires Credentials defined in boto config file (see boto/pyami/config.py). @type storage_uri: StorageUri @param storage_uri: StorageUri specifying a bucket or a bucket+object @rtype: L{AWSAuthConnection} @return: A connection to storage service provider of the given URI. """ connection_args = dict(self.connection_args or ()) # Use OrdinaryCallingFormat instead of boto-default # SubdomainCallingFormat because the latter changes the hostname # that's checked during cert validation for HTTPS connections, # which will fail cert validation (when cert validation is enabled). # Note: the following import can't be moved up to the start of # this file else it causes a config import failure when run from # the resumable upload/download tests. from boto.s3.connection import OrdinaryCallingFormat connection_args['calling_format'] = OrdinaryCallingFormat() connection_args.update(kwargs) if not self.connection: if self.scheme == 's3': from boto.s3.connection import S3Connection self.connection = S3Connection(access_key_id, secret_access_key, **connection_args) elif self.scheme == 'gs': from boto.gs.connection import GSConnection self.connection = GSConnection(access_key_id, secret_access_key, **connection_args) elif self.scheme == 'file': from boto.file.connection import FileConnection self.connection = FileConnection(self) else: raise InvalidUriError('Unrecognized scheme "%s"' % self.scheme) self.connection.debug = self.debug return self.connection def delete_key(self, validate=True, headers=None, version_id=None, mfa_token=None): if not self.object_name: raise InvalidUriError('delete_key on object-less URI (%s)' % self.uri) bucket = self.get_bucket(validate, headers) return bucket.delete_key(self.object_name, headers, version_id, mfa_token) def get_all_keys(self, validate=True, headers=None): bucket = self.get_bucket(validate, headers) return bucket.get_all_keys(headers) def get_bucket(self, validate=True, headers=None): if self.bucket_name is None: raise InvalidUriError('get_bucket on bucket-less URI (%s)' % self.uri) conn = self.connect() bucket = conn.get_bucket(self.bucket_name, validate, headers) self.check_response(bucket, 'bucket', self.uri) return bucket def get_key(self, validate=True, headers=None, version_id=None): if not self.object_name: raise InvalidUriError('get_key on object-less URI (%s)' % self.uri) bucket = self.get_bucket(validate, headers) key = bucket.get_key(self.object_name, headers, version_id) self.check_response(key, 'key', self.uri) return key def new_key(self, validate=True, headers=None): if not self.object_name: raise InvalidUriError('new_key on object-less URI (%s)' % self.uri) bucket = self.get_bucket(validate, headers) return bucket.new_key(self.object_name) def get_contents_as_string(self, validate=True, headers=None, cb=None, num_cb=10, torrent=False, version_id=None): if not self.object_name: raise InvalidUriError('get_contents_as_string on object-less URI ' '(%s)' % self.uri) key = self.get_key(validate, headers) self.check_response(key, 'key', self.uri) return key.get_contents_as_string(headers, cb, num_cb, torrent, version_id) def acl_class(self): if self.bucket_name is None: raise InvalidUriError('acl_class on bucket-less URI (%s)' % self.uri) conn = self.connect() acl_class = conn.provider.acl_class self.check_response(acl_class, 'acl_class', self.uri) return acl_class def canned_acls(self): if self.bucket_name is None: raise InvalidUriError('canned_acls on bucket-less URI (%s)' % self.uri) conn = self.connect() canned_acls = conn.provider.canned_acls self.check_response(canned_acls, 'canned_acls', self.uri) return canned_acls class BucketStorageUri(StorageUri): """ StorageUri subclass that handles bucket storage providers. Callers should instantiate this class by calling boto.storage_uri(). """ def __init__(self, scheme, bucket_name=None, object_name=None, debug=0, connection_args=None): """Instantiate a BucketStorageUri from scheme,bucket,object tuple. @type scheme: string @param scheme: URI scheme naming the storage provider (gs, s3, etc.) @type bucket_name: string @param bucket_name: bucket name @type object_name: string @param object_name: object name @type debug: int @param debug: debug level to pass in to connection (range 0..2) @type connection_args: map @param connection_args: optional map containing args to be passed to {S3,GS}Connection constructor (e.g., to override https_connection_factory). After instantiation the components are available in the following fields: uri, scheme, bucket_name, object_name. """ self.scheme = scheme self.bucket_name = bucket_name self.object_name = object_name if connection_args: self.connection_args = connection_args if self.bucket_name and self.object_name: self.uri = ('%s://%s/%s' % (self.scheme, self.bucket_name, self.object_name)) elif self.bucket_name: self.uri = ('%s://%s/' % (self.scheme, self.bucket_name)) else: self.uri = ('%s://' % self.scheme) self.debug = debug def clone_replace_name(self, new_name): """Instantiate a BucketStorageUri from the current BucketStorageUri, but replacing the object_name. @type new_name: string @param new_name: new object name """ if not self.bucket_name: raise InvalidUriError('clone_replace_name() on bucket-less URI %s' % self.uri) return BucketStorageUri(self.scheme, self.bucket_name, new_name, self.debug) def get_acl(self, validate=True, headers=None, version_id=None): if not self.bucket_name: raise InvalidUriError('get_acl on bucket-less URI (%s)' % self.uri) bucket = self.get_bucket(validate, headers) # This works for both bucket- and object- level ACLs (former passes # key_name=None): acl = bucket.get_acl(self.object_name, headers, version_id) self.check_response(acl, 'acl', self.uri) return acl def get_location(self, validate=True, headers=None): if not self.bucket_name: raise InvalidUriError('get_location on bucket-less URI (%s)' % self.uri) bucket = self.get_bucket(validate, headers) return bucket.get_location() def get_subresource(self, subresource, validate=True, headers=None, version_id=None): if not self.bucket_name: raise InvalidUriError( 'get_subresource on bucket-less URI (%s)' % self.uri) bucket = self.get_bucket(validate, headers) return bucket.get_subresource(subresource, self.object_name, headers, version_id) def add_group_email_grant(self, permission, email_address, recursive=False, validate=True, headers=None): if self.scheme != 'gs': raise ValueError('add_group_email_grant() not supported for %s ' 'URIs.' % self.scheme) if self.object_name: if recursive: raise ValueError('add_group_email_grant() on key-ful URI cannot ' 'specify recursive=True') key = self.get_key(validate, headers) self.check_response(key, 'key', self.uri) key.add_group_email_grant(permission, email_address, headers) elif self.bucket_name: bucket = self.get_bucket(validate, headers) bucket.add_group_email_grant(permission, email_address, recursive, headers) else: raise InvalidUriError('add_group_email_grant() on bucket-less URI %s' % self.uri) def add_email_grant(self, permission, email_address, recursive=False, validate=True, headers=None): if not self.bucket_name: raise InvalidUriError('add_email_grant on bucket-less URI (%s)' % self.uri) if not self.object_name: bucket = self.get_bucket(validate, headers) bucket.add_email_grant(permission, email_address, recursive, headers) else: key = self.get_key(validate, headers) self.check_response(key, 'key', self.uri) key.add_email_grant(permission, email_address) def add_user_grant(self, permission, user_id, recursive=False, validate=True, headers=None): if not self.bucket_name: raise InvalidUriError('add_user_grant on bucket-less URI (%s)' % self.uri) if not self.object_name: bucket = self.get_bucket(validate, headers) bucket.add_user_grant(permission, user_id, recursive, headers) else: key = self.get_key(validate, headers) self.check_response(key, 'key', self.uri) key.add_user_grant(permission, user_id) def list_grants(self, headers=None): if not self.bucket_name: raise InvalidUriError('list_grants on bucket-less URI (%s)' % self.uri) bucket = self.get_bucket(headers) return bucket.list_grants(headers) def names_container(self): """Returns True if this URI names a bucket (vs. an object). """ return not self.object_name def names_singleton(self): """Returns True if this URI names an object (vs. a bucket). """ return self.object_name def is_file_uri(self): return False def is_cloud_uri(self): return True def create_bucket(self, headers=None, location='', policy=None): if self.bucket_name is None: raise InvalidUriError('create_bucket on bucket-less URI (%s)' % self.uri) conn = self.connect() return conn.create_bucket(self.bucket_name, headers, location, policy) def delete_bucket(self, headers=None): if self.bucket_name is None: raise InvalidUriError('delete_bucket on bucket-less URI (%s)' % self.uri) conn = self.connect() return conn.delete_bucket(self.bucket_name, headers) def get_all_buckets(self, headers=None): conn = self.connect() return conn.get_all_buckets(headers) def get_provider(self): conn = self.connect() provider = conn.provider self.check_response(provider, 'provider', self.uri) return provider def set_acl(self, acl_or_str, key_name='', validate=True, headers=None, version_id=None): if not self.bucket_name: raise InvalidUriError('set_acl on bucket-less URI (%s)' % self.uri) self.get_bucket(validate, headers).set_acl(acl_or_str, key_name, headers, version_id) def set_canned_acl(self, acl_str, validate=True, headers=None, version_id=None): if not self.object_name: raise InvalidUriError('set_canned_acl on object-less URI (%s)' % self.uri) key = self.get_key(validate, headers) self.check_response(key, 'key', self.uri) key.set_canned_acl(acl_str, headers, version_id) def set_subresource(self, subresource, value, validate=True, headers=None, version_id=None): if not self.bucket_name: raise InvalidUriError( 'set_subresource on bucket-less URI (%s)' % self.uri) bucket = self.get_bucket(validate, headers) bucket.set_subresource(subresource, value, self.object_name, headers, version_id) def set_contents_from_string(self, s, headers=None, replace=True, cb=None, num_cb=10, policy=None, md5=None, reduced_redundancy=False): key = self.new_key(headers=headers) key.set_contents_from_string(s, headers, replace, cb, num_cb, policy, md5, reduced_redundancy) def enable_logging(self, target_bucket, target_prefix=None, canned_acl=None, validate=True, headers=None, version_id=None): if not self.bucket_name: raise InvalidUriError( 'disable_logging on bucket-less URI (%s)' % self.uri) bucket = self.get_bucket(validate, headers) bucket.enable_logging(target_bucket, target_prefix, headers=headers, canned_acl=canned_acl) def disable_logging(self, validate=True, headers=None, version_id=None): if not self.bucket_name: raise InvalidUriError( 'disable_logging on bucket-less URI (%s)' % self.uri) bucket = self.get_bucket(validate, headers) bucket.disable_logging(headers=headers) class FileStorageUri(StorageUri): """ StorageUri subclass that handles files in the local file system. Callers should instantiate this class by calling boto.storage_uri(). See file/README about how we map StorageUri operations onto a file system. """ def __init__(self, object_name, debug, is_stream=False): """Instantiate a FileStorageUri from a path name. @type object_name: string @param object_name: object name @type debug: boolean @param debug: whether to enable debugging on this StorageUri After instantiation the components are available in the following fields: uri, scheme, bucket_name (always blank for this "anonymous" bucket), object_name. """ self.scheme = 'file' self.bucket_name = '' self.object_name = object_name self.uri = 'file://' + object_name self.debug = debug self.stream = is_stream def clone_replace_name(self, new_name): """Instantiate a FileStorageUri from the current FileStorageUri, but replacing the object_name. @type new_name: string @param new_name: new object name """ return FileStorageUri(new_name, self.debug, self.stream) def names_container(self): """Returns True if this URI is not representing input/output stream and names a directory. """ if not self.stream: return os.path.isdir(self.object_name) else: return False def names_singleton(self): """Returns True if this URI names a file or if URI represents input/output stream. """ if self.stream: return True else: return os.path.isfile(self.object_name) def is_file_uri(self): return True def is_cloud_uri(self): return False def is_stream(self): """Retruns True if this URI represents input/output stream. """ return self.stream ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sts/__init__.py ================================================ # Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010-2011, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from connection import STSConnection from boto.regioninfo import RegionInfo def regions(): """ Get all available regions for the STS service. :rtype: list :return: A list of :class:`boto.regioninfo.RegionInfo` instances """ return [RegionInfo(name='us-east-1', endpoint='sts.amazonaws.com', connection_cls=STSConnection) ] def connect_to_region(region_name, **kw_params): """ Given a valid region name, return a :class:`boto.sts.connection.STSConnection`. :type: str :param region_name: The name of the region to connect to. :rtype: :class:`boto.sts.connection.STSConnection` or ``None`` :return: A connection to the given region, or None if an invalid region name is given """ for region in regions(): if region.name == region_name: return region.connect(**kw_params) return None def get_region(region_name, **kw_params): """ Find and return a :class:`boto.regioninfo.RegionInfo` object given a region name. :type: str :param: The name of the region. :rtype: :class:`boto.regioninfo.RegionInfo` :return: The RegionInfo object for the given region or None if an invalid region name is provided. """ for region in regions(**kw_params): if region.name == region_name: return region return None ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sts/connection.py ================================================ # Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.connection import AWSQueryConnection from boto.regioninfo import RegionInfo from credentials import Credentials, FederationToken import boto class STSConnection(AWSQueryConnection): DefaultRegionName = 'us-east-1' DefaultRegionEndpoint = 'sts.amazonaws.com' APIVersion = '2011-06-15' def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, region=None, path='/', converter=None): if not region: region = RegionInfo(self, self.DefaultRegionName, self.DefaultRegionEndpoint, connection_cls=STSConnection) self.region = region AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, self.region.endpoint, debug, https_connection_factory, path) def _required_auth_capability(self): return ['sign-v2'] def get_session_token(self, duration=None): """ :type duration: int :param duration: The number of seconds the credentials should remain valid. """ params = {} if duration: params['Duration'] = duration return self.get_object('GetSessionToken', params, Credentials, verb='POST') def get_federation_token(self, name, duration=None, policy=None): """ :type name: str :param name: The name of the Federated user associated with the credentials. :type duration: int :param duration: The number of seconds the credentials should remain valid. :type policy: str :param policy: A JSON policy to associate with these credentials. """ params = {'Name' : name} if duration: params['Duration'] = duration if policy: params['Policy'] = policy return self.get_object('GetFederationToken', params, FederationToken, verb='POST') ================================================ FILE: deploy/third_party/boto-2.1.1/boto/sts/credentials.py ================================================ # Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. class Credentials(object): """ :ivar access_key: The AccessKeyID. :ivar secret_key: The SecretAccessKey. :ivar session_token: The session token that must be passed with requests to use the temporary credentials :ivar expiration: The timestamp for when the credentials will expire """ def __init__(self, parent=None): self.parent = parent self.access_key = None self.secret_key = None self.session_token = None self.expiration = None def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'AccessKeyId': self.access_key = value elif name == 'SecretAccessKey': self.secret_key = value elif name == 'SessionToken': self.session_token = value elif name == 'Expiration': self.expiration = value elif name == 'RequestId': self.request_id = value else: pass class FederationToken(object): """ :ivar credentials: A Credentials object containing the credentials. :ivar federated_user_arn: ARN specifying federated user using credentials. :ivar federated_user_id: The ID of the federated user using credentials. :ivar packed_policy_size: A percentage value indicating the size of the policy in packed form """ def __init__(self, parent=None): self.parent = parent self.credentials = None self.federated_user_arn = None self.federated_user_id = None self.packed_policy_size = None def startElement(self, name, attrs, connection): if name == 'Credentials': self.credentials = Credentials() return self.credentials else: return None def endElement(self, name, value, connection): if name == 'Arn': self.federated_user_arn = value elif name == 'FederatedUserId': self.federated_user_id = value elif name == 'PackedPolicySize': self.packed_policy_size = int(value) elif name == 'RequestId': self.request_id = value else: pass ================================================ FILE: deploy/third_party/boto-2.1.1/boto/utils.py ================================================ # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # # Parts of this code were copied or derived from sample code supplied by AWS. # The following notice applies to that code. # # This software code is made available "AS IS" without warranties of any # kind. You may copy, display, modify and redistribute the software # code either by itself or as incorporated into your code; provided that # you do not remove any proprietary notices. Your use of this software # code is at your own risk and you waive any claim against Amazon # Digital Services, Inc. or its affiliates with respect to your use of # this software code. (c) 2006 Amazon Digital Services, Inc. or its # affiliates. """ Some handy utility functions used by several classes. """ import urllib import urllib2 import imp import subprocess import StringIO import time import logging.handlers import boto import tempfile import smtplib import datetime from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import MIMEBase from email.MIMEText import MIMEText from email.Utils import formatdate from email import Encoders import gzip try: import hashlib _hashfn = hashlib.sha512 except ImportError: import md5 _hashfn = md5.md5 # List of Query String Arguments of Interest qsa_of_interest = ['acl', 'location', 'logging', 'partNumber', 'policy', 'requestPayment', 'torrent', 'versioning', 'versionId', 'versions', 'website', 'uploads', 'uploadId', 'response-content-type', 'response-content-language', 'response-expires', 'reponse-cache-control', 'response-content-disposition', 'response-content-encoding'] # generates the aws canonical string for the given parameters def canonical_string(method, path, headers, expires=None, provider=None): if not provider: provider = boto.provider.get_default() interesting_headers = {} for key in headers: lk = key.lower() if headers[key] != None and (lk in ['content-md5', 'content-type', 'date'] or lk.startswith(provider.header_prefix)): interesting_headers[lk] = headers[key].strip() # these keys get empty strings if they don't exist if not interesting_headers.has_key('content-type'): interesting_headers['content-type'] = '' if not interesting_headers.has_key('content-md5'): interesting_headers['content-md5'] = '' # just in case someone used this. it's not necessary in this lib. if interesting_headers.has_key(provider.date_header): interesting_headers['date'] = '' # if you're using expires for query string auth, then it trumps date # (and provider.date_header) if expires: interesting_headers['date'] = str(expires) sorted_header_keys = interesting_headers.keys() sorted_header_keys.sort() buf = "%s\n" % method for key in sorted_header_keys: val = interesting_headers[key] if key.startswith(provider.header_prefix): buf += "%s:%s\n" % (key, val) else: buf += "%s\n" % val # don't include anything after the first ? in the resource... # unless it is one of the QSA of interest, defined above t = path.split('?') buf += t[0] if len(t) > 1: qsa = t[1].split('&') qsa = [ a.split('=') for a in qsa] qsa = [ a for a in qsa if a[0] in qsa_of_interest ] if len(qsa) > 0: qsa.sort(cmp=lambda x,y:cmp(x[0], y[0])) qsa = [ '='.join(a) for a in qsa ] buf += '?' buf += '&'.join(qsa) return buf def merge_meta(headers, metadata, provider=None): if not provider: provider = boto.provider.get_default() metadata_prefix = provider.metadata_prefix final_headers = headers.copy() for k in metadata.keys(): if k.lower() in ['cache-control', 'content-md5', 'content-type', 'content-encoding', 'content-disposition', 'date', 'expires']: final_headers[k] = metadata[k] else: final_headers[metadata_prefix + k] = metadata[k] return final_headers def get_aws_metadata(headers, provider=None): if not provider: provider = boto.provider.get_default() metadata_prefix = provider.metadata_prefix metadata = {} for hkey in headers.keys(): if hkey.lower().startswith(metadata_prefix): val = urllib.unquote_plus(headers[hkey]) try: metadata[hkey[len(metadata_prefix):]] = unicode(val, 'utf-8') except UnicodeDecodeError: metadata[hkey[len(metadata_prefix):]] = val del headers[hkey] return metadata def retry_url(url, retry_on_404=True, num_retries=10): for i in range(0, num_retries): try: req = urllib2.Request(url) resp = urllib2.urlopen(req) return resp.read() except urllib2.HTTPError, e: # in 2.6 you use getcode(), in 2.5 and earlier you use code if hasattr(e, 'getcode'): code = e.getcode() else: code = e.code if code == 404 and not retry_on_404: return '' except: pass boto.log.exception('Caught exception reading instance data') time.sleep(2**i) boto.log.error('Unable to read instance data, giving up') return '' def _get_instance_metadata(url): d = {} data = retry_url(url) if data: fields = data.split('\n') for field in fields: if field.endswith('/'): d[field[0:-1]] = _get_instance_metadata(url + field) else: p = field.find('=') if p > 0: key = field[p+1:] resource = field[0:p] + '/openssh-key' else: key = resource = field val = retry_url(url + resource) p = val.find('\n') if p > 0: val = val.split('\n') d[key] = val return d def get_instance_metadata(version='latest', url='http://169.254.169.254'): """ Returns the instance metadata as a nested Python dictionary. Simple values (e.g. local_hostname, hostname, etc.) will be stored as string values. Values such as ancestor-ami-ids will be stored in the dict as a list of string values. More complex fields such as public-keys and will be stored as nested dicts. """ return _get_instance_metadata('%s/%s/meta-data/' % (url, version)) def get_instance_userdata(version='latest', sep=None, url='http://169.254.169.254'): ud_url = '%s/%s/user-data' % (url,version) user_data = retry_url(ud_url, retry_on_404=False) if user_data: if sep: l = user_data.split(sep) user_data = {} for nvpair in l: t = nvpair.split('=') user_data[t[0].strip()] = t[1].strip() return user_data ISO8601 = '%Y-%m-%dT%H:%M:%SZ' ISO8601_MS = '%Y-%m-%dT%H:%M:%S.%fZ' def get_ts(ts=None): if not ts: ts = time.gmtime() return time.strftime(ISO8601, ts) def parse_ts(ts): try: dt = datetime.datetime.strptime(ts, ISO8601) return dt except ValueError: dt = datetime.datetime.strptime(ts, ISO8601_MS) return dt def find_class(module_name, class_name=None): if class_name: module_name = "%s.%s" % (module_name, class_name) modules = module_name.split('.') c = None try: for m in modules[1:]: if c: c = getattr(c, m) else: c = getattr(__import__(".".join(modules[0:-1])), m) return c except: return None def update_dme(username, password, dme_id, ip_address): """ Update your Dynamic DNS record with DNSMadeEasy.com """ dme_url = 'https://www.dnsmadeeasy.com/servlet/updateip' dme_url += '?username=%s&password=%s&id=%s&ip=%s' s = urllib2.urlopen(dme_url % (username, password, dme_id, ip_address)) return s.read() def fetch_file(uri, file=None, username=None, password=None): """ Fetch a file based on the URI provided. If you do not pass in a file pointer a tempfile.NamedTemporaryFile, or None if the file could not be retrieved is returned. The URI can be either an HTTP url, or "s3://bucket_name/key_name" """ boto.log.info('Fetching %s' % uri) if file == None: file = tempfile.NamedTemporaryFile() try: if uri.startswith('s3://'): bucket_name, key_name = uri[len('s3://'):].split('/', 1) c = boto.connect_s3(aws_access_key_id=username, aws_secret_access_key=password) bucket = c.get_bucket(bucket_name) key = bucket.get_key(key_name) key.get_contents_to_file(file) else: if username and password: passman = urllib2.HTTPPasswordMgrWithDefaultRealm() passman.add_password(None, uri, username, password) authhandler = urllib2.HTTPBasicAuthHandler(passman) opener = urllib2.build_opener(authhandler) urllib2.install_opener(opener) s = urllib2.urlopen(uri) file.write(s.read()) file.seek(0) except: raise boto.log.exception('Problem Retrieving file: %s' % uri) file = None return file class ShellCommand(object): def __init__(self, command, wait=True, fail_fast=False, cwd = None): self.exit_code = 0 self.command = command self.log_fp = StringIO.StringIO() self.wait = wait self.fail_fast = fail_fast self.run(cwd = cwd) def run(self, cwd=None): boto.log.info('running:%s' % self.command) self.process = subprocess.Popen(self.command, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd) if(self.wait): while self.process.poll() == None: time.sleep(1) t = self.process.communicate() self.log_fp.write(t[0]) self.log_fp.write(t[1]) boto.log.info(self.log_fp.getvalue()) self.exit_code = self.process.returncode if self.fail_fast and self.exit_code != 0: raise Exception("Command " + self.command + " failed with status " + self.exit_code) return self.exit_code def setReadOnly(self, value): raise AttributeError def getStatus(self): return self.exit_code status = property(getStatus, setReadOnly, None, 'The exit code for the command') def getOutput(self): return self.log_fp.getvalue() output = property(getOutput, setReadOnly, None, 'The STDIN and STDERR output of the command') class AuthSMTPHandler(logging.handlers.SMTPHandler): """ This class extends the SMTPHandler in the standard Python logging module to accept a username and password on the constructor and to then use those credentials to authenticate with the SMTP server. To use this, you could add something like this in your boto config file: [handler_hand07] class=boto.utils.AuthSMTPHandler level=WARN formatter=form07 args=('localhost', 'username', 'password', 'from@abc', ['user1@abc', 'user2@xyz'], 'Logger Subject') """ def __init__(self, mailhost, username, password, fromaddr, toaddrs, subject): """ Initialize the handler. We have extended the constructor to accept a username/password for SMTP authentication. """ logging.handlers.SMTPHandler.__init__(self, mailhost, fromaddr, toaddrs, subject) self.username = username self.password = password def emit(self, record): """ Emit a record. Format the record and send it to the specified addressees. It would be really nice if I could add authorization to this class without having to resort to cut and paste inheritance but, no. """ try: port = self.mailport if not port: port = smtplib.SMTP_PORT smtp = smtplib.SMTP(self.mailhost, port) smtp.login(self.username, self.password) msg = self.format(record) msg = "From: %s\r\nTo: %s\r\nSubject: %s\r\nDate: %s\r\n\r\n%s" % ( self.fromaddr, ','.join(self.toaddrs), self.getSubject(record), formatdate(), msg) smtp.sendmail(self.fromaddr, self.toaddrs, msg) smtp.quit() except (KeyboardInterrupt, SystemExit): raise except: self.handleError(record) class LRUCache(dict): """A dictionary-like object that stores only a certain number of items, and discards its least recently used item when full. >>> cache = LRUCache(3) >>> cache['A'] = 0 >>> cache['B'] = 1 >>> cache['C'] = 2 >>> len(cache) 3 >>> cache['A'] 0 Adding new items to the cache does not increase its size. Instead, the least recently used item is dropped: >>> cache['D'] = 3 >>> len(cache) 3 >>> 'B' in cache False Iterating over the cache returns the keys, starting with the most recently used: >>> for key in cache: ... print key D A C This code is based on the LRUCache class from Genshi which is based on Mighty's LRUCache from ``myghtyutils.util``, written by Mike Bayer and released under the MIT license (Genshi uses the BSD License). See: http://svn.myghty.org/myghtyutils/trunk/lib/myghtyutils/util.py """ class _Item(object): def __init__(self, key, value): self.previous = self.next = None self.key = key self.value = value def __repr__(self): return repr(self.value) def __init__(self, capacity): self._dict = dict() self.capacity = capacity self.head = None self.tail = None def __contains__(self, key): return key in self._dict def __iter__(self): cur = self.head while cur: yield cur.key cur = cur.next def __len__(self): return len(self._dict) def __getitem__(self, key): item = self._dict[key] self._update_item(item) return item.value def __setitem__(self, key, value): item = self._dict.get(key) if item is None: item = self._Item(key, value) self._dict[key] = item self._insert_item(item) else: item.value = value self._update_item(item) self._manage_size() def __repr__(self): return repr(self._dict) def _insert_item(self, item): item.previous = None item.next = self.head if self.head is not None: self.head.previous = item else: self.tail = item self.head = item self._manage_size() def _manage_size(self): while len(self._dict) > self.capacity: del self._dict[self.tail.key] if self.tail != self.head: self.tail = self.tail.previous self.tail.next = None else: self.head = self.tail = None def _update_item(self, item): if self.head == item: return previous = item.previous previous.next = item.next if item.next is not None: item.next.previous = previous else: self.tail = previous item.previous = None item.next = self.head self.head.previous = self.head = item class Password(object): """ Password object that stores itself as hashed. Hash defaults to SHA512 if available, MD5 otherwise. """ hashfunc=_hashfn def __init__(self, str=None, hashfunc=None): """ Load the string from an initial value, this should be the raw hashed password. """ self.str = str if hashfunc: self.hashfunc = hashfunc def set(self, value): self.str = self.hashfunc(value).hexdigest() def __str__(self): return str(self.str) def __eq__(self, other): if other == None: return False return str(self.hashfunc(other).hexdigest()) == str(self.str) def __len__(self): if self.str: return len(self.str) else: return 0 def notify(subject, body=None, html_body=None, to_string=None, attachments=None, append_instance_id=True): attachments = attachments or [] if append_instance_id: subject = "[%s] %s" % (boto.config.get_value("Instance", "instance-id"), subject) if not to_string: to_string = boto.config.get_value('Notification', 'smtp_to', None) if to_string: try: from_string = boto.config.get_value('Notification', 'smtp_from', 'boto') msg = MIMEMultipart() msg['From'] = from_string msg['Reply-To'] = from_string msg['To'] = to_string msg['Date'] = formatdate(localtime=True) msg['Subject'] = subject if body: msg.attach(MIMEText(body)) if html_body: part = MIMEBase('text', 'html') part.set_payload(html_body) Encoders.encode_base64(part) msg.attach(part) for part in attachments: msg.attach(part) smtp_host = boto.config.get_value('Notification', 'smtp_host', 'localhost') # Alternate port support if boto.config.get_value("Notification", "smtp_port"): server = smtplib.SMTP(smtp_host, int(boto.config.get_value("Notification", "smtp_port"))) else: server = smtplib.SMTP(smtp_host) # TLS support if boto.config.getbool("Notification", "smtp_tls"): server.ehlo() server.starttls() server.ehlo() smtp_user = boto.config.get_value('Notification', 'smtp_user', '') smtp_pass = boto.config.get_value('Notification', 'smtp_pass', '') if smtp_user: server.login(smtp_user, smtp_pass) server.sendmail(from_string, to_string, msg.as_string()) server.quit() except: boto.log.exception('notify failed') def get_utf8_value(value): if not isinstance(value, str) and not isinstance(value, unicode): value = str(value) if isinstance(value, unicode): return value.encode('utf-8') else: return value def mklist(value): if not isinstance(value, list): if isinstance(value, tuple): value = list(value) else: value = [value] return value def pythonize_name(name, sep='_'): s = '' if name[0].isupper: s = name[0].lower() for c in name[1:]: if c.isupper(): s += sep + c.lower() else: s += c return s def write_mime_multipart(content, compress=False, deftype='text/plain', delimiter=':'): """Description: :param content: A list of tuples of name-content pairs. This is used instead of a dict to ensure that scripts run in order :type list of tuples: :param compress: Use gzip to compress the scripts, defaults to no compression :type bool: :param deftype: The type that should be assumed if nothing else can be figured out :type str: :param delimiter: mime delimiter :type str: :return: Final mime multipart :rtype: str: """ wrapper = MIMEMultipart() for name,con in content: definite_type = guess_mime_type(con, deftype) maintype, subtype = definite_type.split('/', 1) if maintype == 'text': mime_con = MIMEText(con, _subtype=subtype) else: mime_con = MIMEBase(maintype, subtype) mime_con.set_payload(con) # Encode the payload using Base64 Encoders.encode_base64(mime_con) mime_con.add_header('Content-Disposition', 'attachment', filename=name) wrapper.attach(mime_con) rcontent = wrapper.as_string() if compress: buf = StringIO.StringIO() gz = gzip.GzipFile(mode='wb', fileobj=buf) try: gz.write(rcontent) finally: gz.close() rcontent = buf.getvalue() return rcontent def guess_mime_type(content, deftype): """Description: Guess the mime type of a block of text :param content: content we're finding the type of :type str: :param deftype: Default mime type :type str: :rtype: : :return: """ #Mappings recognized by cloudinit starts_with_mappings={ '#include' : 'text/x-include-url', '#!' : 'text/x-shellscript', '#cloud-config' : 'text/cloud-config', '#upstart-job' : 'text/upstart-job', '#part-handler' : 'text/part-handler', '#cloud-boothook' : 'text/cloud-boothook' } rtype = deftype for possible_type,mimetype in starts_with_mappings.items(): if content.startswith(possible_type): rtype = mimetype break return(rtype) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/vpc/__init__.py ================================================ # Copyright (c) 2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents a connection to the EC2 service. """ from boto.ec2.connection import EC2Connection from boto.resultset import ResultSet from boto.vpc.vpc import VPC from boto.vpc.customergateway import CustomerGateway from boto.vpc.routetable import RouteTable from boto.vpc.internetgateway import InternetGateway from boto.vpc.vpngateway import VpnGateway, Attachment from boto.vpc.dhcpoptions import DhcpOptions from boto.vpc.subnet import Subnet from boto.vpc.vpnconnection import VpnConnection class VPCConnection(EC2Connection): # VPC methods def get_all_vpcs(self, vpc_ids=None, filters=None): """ Retrieve information about your VPCs. You can filter results to return information only about those VPCs that match your search parameters. Otherwise, all VPCs associated with your account are returned. :type vpc_ids: list :param vpc_ids: A list of strings with the desired VPC ID's :type filters: list of tuples :param filters: A list of tuples containing filters. Each tuple consists of a filter key and a filter value. Possible filter keys are: - *state*, the state of the VPC (pending or available) - *cidrBlock*, CIDR block of the VPC - *dhcpOptionsId*, the ID of a set of DHCP options :rtype: list :return: A list of :class:`boto.vpc.vpc.VPC` """ params = {} if vpc_ids: self.build_list_params(params, vpc_ids, 'VpcId') if filters: i = 1 for filter in filters: params[('Filter.%d.Name' % i)] = filter[0] params[('Filter.%d.Value.1' % i)] = filter[1] i += 1 return self.get_list('DescribeVpcs', params, [('item', VPC)]) def create_vpc(self, cidr_block): """ Create a new Virtual Private Cloud. :type cidr_block: str :param cidr_block: A valid CIDR block :rtype: The newly created VPC :return: A :class:`boto.vpc.vpc.VPC` object """ params = {'CidrBlock' : cidr_block} return self.get_object('CreateVpc', params, VPC) def delete_vpc(self, vpc_id): """ Delete a Virtual Private Cloud. :type vpc_id: str :param vpc_id: The ID of the vpc to be deleted. :rtype: bool :return: True if successful """ params = {'VpcId': vpc_id} return self.get_status('DeleteVpc', params) # Route Tables def get_all_route_tables(self, route_table_ids=None, filters=None): """ Retrieve information about your routing tables. You can filter results to return information only about those route tables that match your search parameters. Otherwise, all route tables associated with your account are returned. :type route_table_ids: list :param route_table_ids: A list of strings with the desired route table IDs. :type filters: list of tuples :param filters: A list of tuples containing filters. Each tuple consists of a filter key and a filter value. :rtype: list :return: A list of :class:`boto.vpc.routetable.RouteTable` """ params = {} if route_table_ids: self.build_list_params(params, route_table_ids, "RouteTableId") if filters: self.build_filter_params(params, dict(filters)) return self.get_list('DescribeRouteTables', params, [('item', RouteTable)]) def associate_route_table(self, route_table_id, subnet_id): """ Associates a route table with a specific subnet. :type route_table_id: str :param route_table_id: The ID of the route table to associate. :type subnet_id: str :param subnet_id: The ID of the subnet to associate with. :rtype: str :return: The ID of the association created """ params = { 'RouteTableId': route_table_id, 'SubnetId': subnet_id } result = self.get_object('AssociateRouteTable', params, ResultSet) return result.associationId def disassociate_route_table(self, association_id): """ Removes an association from a route table. This will cause all subnets that would've used this association to now use the main routing association instead. :type association_id: str :param association_id: The ID of the association to disassociate. :rtype: bool :return: True if successful """ params = { 'AssociationId': association_id } return self.get_status('DisassociateRouteTable', params) def create_route_table(self, vpc_id): """ Creates a new route table. :type vpc_id: str :param vpc_id: The VPC ID to associate this route table with. :rtype: The newly created route table :return: A :class:`boto.vpc.routetable.RouteTable` object """ params = { 'VpcId': vpc_id } return self.get_object('CreateRouteTable', params, RouteTable) def delete_route_table(self, route_table_id): """ Delete a route table. :type route_table_id: str :param route_table_id: The ID of the route table to delete. :rtype: bool :return: True if successful """ params = { 'RouteTableId': route_table_id } return self.get_status('DeleteRouteTable', params) def create_route(self, route_table_id, destination_cidr_block, gateway_id=None, instance_id=None): """ Creates a new route in the route table within a VPC. The route's target can be either a gateway attached to the VPC or a NAT instance in the VPC. :type route_table_id: str :param route_table_id: The ID of the route table for the route. :type destination_cidr_block: str :param destination_cidr_block: The CIDR address block used for the destination match. :type gateway_id: str :param gateway_id: The ID of the gateway attached to your VPC. :type instance_id: str :param instance_id: The ID of a NAT instance in your VPC. :rtype: bool :return: True if successful """ params = { 'RouteTableId': route_table_id, 'DestinationCidrBlock': destination_cidr_block } if gateway_id is not None: params['GatewayId'] = gateway_id elif instance_id is not None: params['InstanceId'] = instance_id return self.get_status('CreateRoute', params) def delete_route(self, route_table_id, destination_cidr_block): """ Deletes a route from a route table within a VPC. :type route_table_id: str :param route_table_id: The ID of the route table with the route. :type destination_cidr_block: str :param destination_cidr_block: The CIDR address block used for destination match. :rtype: bool :return: True if successful """ params = { 'RouteTableId': route_table_id, 'DestinationCidrBlock': destination_cidr_block } return self.get_status('DeleteRoute', params) # Internet Gateways def get_all_internet_gateways(self, internet_gateway_ids=None, filters=None): """ Get a list of internet gateways. You can filter results to return information about only those gateways that you're interested in. :type internet_gateway_ids: list :param internet_gateway_ids: A list of strings with the desired gateway IDs. :type filters: list of tuples :param filters: A list of tuples containing filters. Each tuple consists of a filter key and a filter value. """ params = {} if internet_gateway_ids: self.build_list_params(params, internet_gateway_ids, 'InternetGatewayId') if filters: self.build_filter_params(params, dict(filters)) return self.get_list('DescribeInternetGateways', params, [('item', InternetGateway)]) def create_internet_gateway(self): """ Creates an internet gateway for VPC. :rtype: Newly created internet gateway. :return: `boto.vpc.internetgateway.InternetGateway` """ return self.get_object('CreateInternetGateway', {}, InternetGateway) def delete_internet_gateway(self, internet_gateway_id): """ Deletes an internet gateway from the VPC. :type internet_gateway_id: str :param internet_gateway_id: The ID of the internet gateway to delete. :rtype: Bool :return: True if successful """ params = { 'InternetGatewayId': internet_gateway_id } return self.get_status('DeleteInternetGateway', params) def attach_internet_gateway(self, internet_gateway_id, vpc_id): """ Attach an internet gateway to a specific VPC. :type internet_gateway_id: str :param internet_gateway_id: The ID of the internet gateway to delete. :type vpc_id: str :param vpc_id: The ID of the VPC to attach to. :rtype: Bool :return: True if successful """ params = { 'InternetGatewayId': internet_gateway_id, 'VpcId': vpc_id } return self.get_status('AttachInternetGateway', params) def detach_internet_gateway(self, internet_gateway_id, vpc_id): """ Detach an internet gateway from a specific VPC. :type internet_gateway_id: str :param internet_gateway_id: The ID of the internet gateway to delete. :type vpc_id: str :param vpc_id: The ID of the VPC to attach to. :rtype: Bool :return: True if successful """ params = { 'InternetGatewayId': internet_gateway_id, 'VpcId': vpc_id } return self.get_status('DetachInternetGateway', params) # Customer Gateways def get_all_customer_gateways(self, customer_gateway_ids=None, filters=None): """ Retrieve information about your CustomerGateways. You can filter results to return information only about those CustomerGateways that match your search parameters. Otherwise, all CustomerGateways associated with your account are returned. :type customer_gateway_ids: list :param customer_gateway_ids: A list of strings with the desired CustomerGateway ID's :type filters: list of tuples :param filters: A list of tuples containing filters. Each tuple consists of a filter key and a filter value. Possible filter keys are: - *state*, the state of the CustomerGateway (pending,available,deleting,deleted) - *type*, the type of customer gateway (ipsec.1) - *ipAddress* the IP address of customer gateway's internet-routable external inteface :rtype: list :return: A list of :class:`boto.vpc.customergateway.CustomerGateway` """ params = {} if customer_gateway_ids: self.build_list_params(params, customer_gateway_ids, 'CustomerGatewayId') if filters: i = 1 for filter in filters: params[('Filter.%d.Name' % i)] = filter[0] params[('Filter.%d.Value.1')] = filter[1] i += 1 return self.get_list('DescribeCustomerGateways', params, [('item', CustomerGateway)]) def create_customer_gateway(self, type, ip_address, bgp_asn): """ Create a new Customer Gateway :type type: str :param type: Type of VPN Connection. Only valid valid currently is 'ipsec.1' :type ip_address: str :param ip_address: Internet-routable IP address for customer's gateway. Must be a static address. :type bgp_asn: str :param bgp_asn: Customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN) :rtype: The newly created CustomerGateway :return: A :class:`boto.vpc.customergateway.CustomerGateway` object """ params = {'Type' : type, 'IpAddress' : ip_address, 'BgpAsn' : bgp_asn} return self.get_object('CreateCustomerGateway', params, CustomerGateway) def delete_customer_gateway(self, customer_gateway_id): """ Delete a Customer Gateway. :type customer_gateway_id: str :param customer_gateway_id: The ID of the customer_gateway to be deleted. :rtype: bool :return: True if successful """ params = {'CustomerGatewayId': customer_gateway_id} return self.get_status('DeleteCustomerGateway', params) # VPN Gateways def get_all_vpn_gateways(self, vpn_gateway_ids=None, filters=None): """ Retrieve information about your VpnGateways. You can filter results to return information only about those VpnGateways that match your search parameters. Otherwise, all VpnGateways associated with your account are returned. :type vpn_gateway_ids: list :param vpn_gateway_ids: A list of strings with the desired VpnGateway ID's :type filters: list of tuples :param filters: A list of tuples containing filters. Each tuple consists of a filter key and a filter value. Possible filter keys are: - *state*, the state of the VpnGateway (pending,available,deleting,deleted) - *type*, the type of customer gateway (ipsec.1) - *availabilityZone*, the Availability zone the VPN gateway is in. :rtype: list :return: A list of :class:`boto.vpc.customergateway.VpnGateway` """ params = {} if vpn_gateway_ids: self.build_list_params(params, vpn_gateway_ids, 'VpnGatewayId') if filters: i = 1 for filter in filters: params[('Filter.%d.Name' % i)] = filter[0] params[('Filter.%d.Value.1')] = filter[1] i += 1 return self.get_list('DescribeVpnGateways', params, [('item', VpnGateway)]) def create_vpn_gateway(self, type, availability_zone=None): """ Create a new Vpn Gateway :type type: str :param type: Type of VPN Connection. Only valid valid currently is 'ipsec.1' :type availability_zone: str :param availability_zone: The Availability Zone where you want the VPN gateway. :rtype: The newly created VpnGateway :return: A :class:`boto.vpc.vpngateway.VpnGateway` object """ params = {'Type' : type} if availability_zone: params['AvailabilityZone'] = availability_zone return self.get_object('CreateVpnGateway', params, VpnGateway) def delete_vpn_gateway(self, vpn_gateway_id): """ Delete a Vpn Gateway. :type vpn_gateway_id: str :param vpn_gateway_id: The ID of the vpn_gateway to be deleted. :rtype: bool :return: True if successful """ params = {'VpnGatewayId': vpn_gateway_id} return self.get_status('DeleteVpnGateway', params) def attach_vpn_gateway(self, vpn_gateway_id, vpc_id): """ Attaches a VPN gateway to a VPC. :type vpn_gateway_id: str :param vpn_gateway_id: The ID of the vpn_gateway to attach :type vpc_id: str :param vpc_id: The ID of the VPC you want to attach the gateway to. :rtype: An attachment :return: a :class:`boto.vpc.vpngateway.Attachment` """ params = {'VpnGatewayId': vpn_gateway_id, 'VpcId' : vpc_id} return self.get_object('AttachVpnGateway', params, Attachment) # Subnets def get_all_subnets(self, subnet_ids=None, filters=None): """ Retrieve information about your Subnets. You can filter results to return information only about those Subnets that match your search parameters. Otherwise, all Subnets associated with your account are returned. :type subnet_ids: list :param subnet_ids: A list of strings with the desired Subnet ID's :type filters: list of tuples :param filters: A list of tuples containing filters. Each tuple consists of a filter key and a filter value. Possible filter keys are: - *state*, the state of the Subnet (pending,available) - *vpdId*, the ID of teh VPC the subnet is in. - *cidrBlock*, CIDR block of the subnet - *availabilityZone*, the Availability Zone the subnet is in. :rtype: list :return: A list of :class:`boto.vpc.subnet.Subnet` """ params = {} if subnet_ids: self.build_list_params(params, subnet_ids, 'SubnetId') if filters: i = 1 for filter in filters: params[('Filter.%d.Name' % i)] = filter[0] params[('Filter.%d.Value.1' % i)] = filter[1] i += 1 return self.get_list('DescribeSubnets', params, [('item', Subnet)]) def create_subnet(self, vpc_id, cidr_block, availability_zone=None): """ Create a new Subnet :type vpc_id: str :param vpc_id: The ID of the VPC where you want to create the subnet. :type cidr_block: str :param cidr_block: The CIDR block you want the subnet to cover. :type availability_zone: str :param availability_zone: The AZ you want the subnet in :rtype: The newly created Subnet :return: A :class:`boto.vpc.customergateway.Subnet` object """ params = {'VpcId' : vpc_id, 'CidrBlock' : cidr_block} if availability_zone: params['AvailabilityZone'] = availability_zone return self.get_object('CreateSubnet', params, Subnet) def delete_subnet(self, subnet_id): """ Delete a subnet. :type subnet_id: str :param subnet_id: The ID of the subnet to be deleted. :rtype: bool :return: True if successful """ params = {'SubnetId': subnet_id} return self.get_status('DeleteSubnet', params) # DHCP Options def get_all_dhcp_options(self, dhcp_options_ids=None): """ Retrieve information about your DhcpOptions. :type dhcp_options_ids: list :param dhcp_options_ids: A list of strings with the desired DhcpOption ID's :rtype: list :return: A list of :class:`boto.vpc.dhcpoptions.DhcpOptions` """ params = {} if dhcp_options_ids: self.build_list_params(params, dhcp_options_ids, 'DhcpOptionsId') return self.get_list('DescribeDhcpOptions', params, [('item', DhcpOptions)]) def create_dhcp_options(self, vpc_id, cidr_block, availability_zone=None): """ Create a new DhcpOption :type vpc_id: str :param vpc_id: The ID of the VPC where you want to create the subnet. :type cidr_block: str :param cidr_block: The CIDR block you want the subnet to cover. :type availability_zone: str :param availability_zone: The AZ you want the subnet in :rtype: The newly created DhcpOption :return: A :class:`boto.vpc.customergateway.DhcpOption` object """ params = {'VpcId' : vpc_id, 'CidrBlock' : cidr_block} if availability_zone: params['AvailabilityZone'] = availability_zone return self.get_object('CreateDhcpOption', params, DhcpOptions) def delete_dhcp_options(self, dhcp_options_id): """ Delete a DHCP Options :type dhcp_options_id: str :param dhcp_options_id: The ID of the DHCP Options to be deleted. :rtype: bool :return: True if successful """ params = {'DhcpOptionsId': dhcp_options_id} return self.get_status('DeleteDhcpOptions', params) def associate_dhcp_options(self, dhcp_options_id, vpc_id): """ Associate a set of Dhcp Options with a VPC. :type dhcp_options_id: str :param dhcp_options_id: The ID of the Dhcp Options :type vpc_id: str :param vpc_id: The ID of the VPC. :rtype: bool :return: True if successful """ params = {'DhcpOptionsId': dhcp_options_id, 'VpcId' : vpc_id} return self.get_status('AssociateDhcpOptions', params) # VPN Connection def get_all_vpn_connections(self, vpn_connection_ids=None, filters=None): """ Retrieve information about your VPN_CONNECTIONs. You can filter results to return information only about those VPN_CONNECTIONs that match your search parameters. Otherwise, all VPN_CONNECTIONs associated with your account are returned. :type vpn_connection_ids: list :param vpn_connection_ids: A list of strings with the desired VPN_CONNECTION ID's :type filters: list of tuples :param filters: A list of tuples containing filters. Each tuple consists of a filter key and a filter value. Possible filter keys are: - *state*, the state of the VPN_CONNECTION pending,available,deleting,deleted - *type*, the type of connection, currently 'ipsec.1' - *customerGatewayId*, the ID of the customer gateway associated with the VPN - *vpnGatewayId*, the ID of the VPN gateway associated with the VPN connection :rtype: list :return: A list of :class:`boto.vpn_connection.vpnconnection.VpnConnection` """ params = {} if vpn_connection_ids: self.build_list_params(params, vpn_connection_ids, 'Vpn_ConnectionId') if filters: i = 1 for filter in filters: params[('Filter.%d.Name' % i)] = filter[0] params[('Filter.%d.Value.1')] = filter[1] i += 1 return self.get_list('DescribeVpnConnections', params, [('item', VpnConnection)]) def create_vpn_connection(self, type, customer_gateway_id, vpn_gateway_id): """ Create a new VPN Connection. :type type: str :param type: The type of VPN Connection. Currently only 'ipsec.1' is supported :type customer_gateway_id: str :param customer_gateway_id: The ID of the customer gateway. :type vpn_gateway_id: str :param vpn_gateway_id: The ID of the VPN gateway. :rtype: The newly created VpnConnection :return: A :class:`boto.vpc.vpnconnection.VpnConnection` object """ params = {'Type' : type, 'CustomerGatewayId' : customer_gateway_id, 'VpnGatewayId' : vpn_gateway_id} return self.get_object('CreateVpnConnection', params, VpnConnection) def delete_vpn_connection(self, vpn_connection_id): """ Delete a VPN Connection. :type vpn_connection_id: str :param vpn_connection_id: The ID of the vpn_connection to be deleted. :rtype: bool :return: True if successful """ params = {'VpnConnectionId': vpn_connection_id} return self.get_status('DeleteVpnConnection', params) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/vpc/customergateway.py ================================================ # Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents a Customer Gateway """ from boto.ec2.ec2object import TaggedEC2Object class CustomerGateway(TaggedEC2Object): def __init__(self, connection=None): TaggedEC2Object.__init__(self, connection) self.id = None self.type = None self.state = None self.ip_address = None self.bgp_asn = None def __repr__(self): return 'CustomerGateway:%s' % self.id def endElement(self, name, value, connection): if name == 'customerGatewayId': self.id = value elif name == 'ipAddress': self.ip_address = value elif name == 'type': self.type = value elif name == 'state': self.state = value elif name == 'bgpAsn': self.bgp_asn = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/vpc/dhcpoptions.py ================================================ # Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents a DHCP Options set """ from boto.ec2.ec2object import TaggedEC2Object class DhcpValueSet(list): def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'value': self.append(value) class DhcpConfigSet(dict): def startElement(self, name, attrs, connection): if name == 'valueSet': if not self.has_key(self._name): self[self._name] = DhcpValueSet() return self[self._name] def endElement(self, name, value, connection): if name == 'key': self._name = value class DhcpOptions(TaggedEC2Object): def __init__(self, connection=None): TaggedEC2Object.__init__(self, connection) self.id = None self.options = None def __repr__(self): return 'DhcpOptions:%s' % self.id def startElement(self, name, attrs, connection): retval = TaggedEC2Object.startElement(self, name, attrs, connection) if retval is not None: return retval if name == 'dhcpConfigurationSet': self.options = DhcpConfigSet() return self.options def endElement(self, name, value, connection): if name == 'dhcpOptionsId': self.id = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/vpc/internetgateway.py ================================================ # Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents an Internet Gateway """ from boto.ec2.ec2object import TaggedEC2Object from boto.resultset import ResultSet class InternetGateway(TaggedEC2Object): def __init__(self, connection=None): TaggedEC2Object.__init__(self, connection) self.id = None self.attachments = [] def __repr__(self): return 'InternetGateway:%s' % self.id def startElement(self, name, attrs, connection): result = super(InternetGateway, self).startElement(name, attrs, connection) if result is not None: # Parent found an interested element, just return it return result if name == 'attachmentSet': self.attachments = ResultSet([('item', InternetGatewayAttachment)]) return self.attachments else: return None def endElement(self, name, value, connection): if name == 'internetGatewayId': self.id = value else: setattr(self, name, value) class InternetGatewayAttachment(object): def __init__(self, connection=None): self.vpc_id = None self.state = None def __repr__(self): return 'InternetGatewayAttachment:%s' % self.vpc_id def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'vpcId': self.vpc_id = value elif name == 'state': self.state = value ================================================ FILE: deploy/third_party/boto-2.1.1/boto/vpc/routetable.py ================================================ # Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents a Route Table """ from boto.ec2.ec2object import TaggedEC2Object from boto.resultset import ResultSet class RouteTable(TaggedEC2Object): def __init__(self, connection=None): TaggedEC2Object.__init__(self, connection) self.id = None self.vpc_id = None self.routes = [] self.associations = [] def __repr__(self): return 'RouteTable:%s' % self.id def startElement(self, name, attrs, connection): result = super(RouteTable, self).startElement(name, attrs, connection) if result is not None: # Parent found an interested element, just return it return result if name == 'routeSet': self.routes = ResultSet([('item', Route)]) return self.routes elif name == 'associationSet': self.associations = ResultSet([('item', RouteAssociation)]) return self.associations else: return None def endElement(self, name, value, connection): if name == 'routeTableId': self.id = value elif name == 'vpcId': self.vpc_id = value else: setattr(self, name, value) class Route(object): def __init__(self, connection=None): self.destination_cidr_block = None self.gateway_id = None self.instance_id = None self.state = None def __repr__(self): return 'Route:%s' % self.destination_cidr_block def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'destinationCidrBlock': self.destination_cidr_block = value elif name == 'gatewayId': self.gateway_id = value elif name == 'instanceId': self.instance_id = value elif name == 'state': self.state = value class RouteAssociation(object): def __init__(self, connection=None): self.id = None self.route_table_id = None self.subnet_id = None self.main = False def __repr__(self): return 'RouteAssociation:%s' % self.id def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'routeTableAssociationId': self.id = value elif name == 'routeTableId': self.route_table_id = value elif name == 'subnetId': self.subnet_id = value elif name == 'main': self.main = value == 'true' ================================================ FILE: deploy/third_party/boto-2.1.1/boto/vpc/subnet.py ================================================ # Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents a Subnet """ from boto.ec2.ec2object import TaggedEC2Object class Subnet(TaggedEC2Object): def __init__(self, connection=None): TaggedEC2Object.__init__(self, connection) self.id = None self.vpc_id = None self.state = None self.cidr_block = None self.available_ip_address_count = 0 self.availability_zone = None def __repr__(self): return 'Subnet:%s' % self.id def endElement(self, name, value, connection): if name == 'subnetId': self.id = value elif name == 'vpcId': self.vpc_id = value elif name == 'state': self.state = value elif name == 'cidrBlock': self.cidr_block = value elif name == 'availableIpAddressCount': self.available_ip_address_count = int(value) elif name == 'availabilityZone': self.availability_zone = value else: setattr(self, name, value) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/vpc/vpc.py ================================================ # Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents a Virtual Private Cloud. """ from boto.ec2.ec2object import TaggedEC2Object class VPC(TaggedEC2Object): def __init__(self, connection=None): TaggedEC2Object.__init__(self, connection) self.id = None self.dhcp_options_id = None self.state = None self.cidr_block = None def __repr__(self): return 'VPC:%s' % self.id def endElement(self, name, value, connection): if name == 'vpcId': self.id = value elif name == 'dhcpOptionsId': self.dhcp_options_id = value elif name == 'state': self.state = value elif name == 'cidrBlock': self.cidr_block = value else: setattr(self, name, value) def delete(self): return self.connection.delete_vpc(self.id) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/vpc/vpnconnection.py ================================================ # Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents a VPN Connectionn """ from boto.ec2.ec2object import EC2Object class VpnConnection(EC2Object): def __init__(self, connection=None): EC2Object.__init__(self, connection) self.id = None self.state = None self.customer_gateway_configuration = None self.type = None self.customer_gateway_id = None self.vpn_gateway_id = None def __repr__(self): return 'VpnConnection:%s' % self.id def endElement(self, name, value, connection): if name == 'vpnConnectionId': self.id = value elif name == 'state': self.state = value elif name == 'CustomerGatewayConfiguration': self.customer_gateway_configuration = value elif name == 'type': self.type = value elif name == 'customerGatewayId': self.customer_gateway_id = value elif name == 'vpnGatewayId': self.vpn_gateway_id = value else: setattr(self, name, value) def delete(self): return self.connection.delete_vpn_connection(self.id) ================================================ FILE: deploy/third_party/boto-2.1.1/boto/vpc/vpngateway.py ================================================ # Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. """ Represents a Vpn Gateway """ from boto.ec2.ec2object import TaggedEC2Object class Attachment(object): def __init__(self, connection=None): self.vpc_id = None self.state = None def startElement(self, name, attrs, connection): pass def endElement(self, name, value, connection): if name == 'vpcId': self.vpc_id = value elif name == 'state': self.state = value else: setattr(self, name, value) class VpnGateway(TaggedEC2Object): def __init__(self, connection=None): TaggedEC2Object.__init__(self, connection) self.id = None self.type = None self.state = None self.availability_zone = None self.attachments = [] def __repr__(self): return 'VpnGateway:%s' % self.id def startElement(self, name, attrs, connection): retval = TaggedEC2Object.startElement(self, name, attrs, connection) if retval is not None: return retval if name == 'item': att = Attachment() self.attachments.append(att) return att def endElement(self, name, value, connection): if name == 'vpnGatewayId': self.id = value elif name == 'type': self.type = value elif name == 'state': self.state = value elif name == 'availabilityZone': self.availability_zone = value elif name == 'attachments': pass else: setattr(self, name, value) def attach(self, vpc_id): return self.connection.attach_vpn_gateway(self.id, vpc_id) ================================================ FILE: deploy/third_party/boto-2.1.1/setup.py ================================================ #!/usr/bin/env python # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. try: from setuptools import setup extra = dict(test_suite="tests.test.suite", include_package_data=True) except ImportError: from distutils.core import setup extra = {} import sys from boto import __version__ if sys.version_info <= (2, 4): error = "ERROR: boto requires Python Version 2.5 or above...exiting." print >> sys.stderr, error sys.exit(1) setup(name = "boto", version = __version__, description = "Amazon Web Services Library", long_description = "Python interface to Amazon's Web Services.", author = "Mitch Garnaat", author_email = "mitch@garnaat.com", scripts = ["bin/sdbadmin", "bin/elbadmin", "bin/cfadmin", "bin/s3put", "bin/fetch_file", "bin/launch_instance", "bin/list_instances", "bin/taskadmin", "bin/kill_instance", "bin/bundle_image", "bin/pyami_sendmail", "bin/lss3", "bin/cq", "bin/route53", "bin/s3multiput", "bin/cwutil"], url = "http://code.google.com/p/boto/", packages = ["boto", "boto.sqs", "boto.s3", "boto.gs", "boto.file", "boto.ec2", "boto.ec2.cloudwatch", "boto.ec2.autoscale", "boto.ec2.elb", "boto.sdb", "boto.cacerts", "boto.sdb.db", "boto.sdb.db.manager", "boto.mturk", "boto.pyami", "boto.mashups", "boto.contrib", "boto.manage", "boto.services", "boto.cloudfront", "boto.roboto", "boto.rds", "boto.vpc", "boto.fps", "boto.emr", "boto.sns", "boto.ecs", "boto.iam", "boto.route53", "boto.ses", "boto.cloudformation", "boto.sts"], package_data = {"boto.cacerts": ["cacerts.txt"]}, license = "MIT", platforms = "Posix; MacOS X; Windows", classifiers = ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Topic :: Internet"], **extra ) ================================================ FILE: lib/README ================================================ mvn install:install-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=./javax.jms-1.1.jar ================================================ FILE: pom.xml ================================================ 4.0.0 edu.berkeley sparrow jar 1.0-SNAPSHOT sparrow http://maven.apache.org junit junit 4.10 test com.google.guava guava 14.0.1 com.google.protobuf protobuf-java 2.4.1 log4j log4j 1.2.16 org.slf4j slf4j-log4j12 1.6.4 org.apache.thrift libthrift 0.8.0 org.mockito mockito-core 1.9.0 test commons-pool commons-pool 1.6 net.sf.jopt-simple jopt-simple 4.3 org.apache.zookeeper zookeeper 3.3.4 com.sun.jmx jmxri com.sun.jdmk jmxtools commons-configuration commons-configuration 1.7 org.apache.commons commons-math 2.2 org.apache.maven.plugins maven-shade-plugin 1.5 package shade org.apache.maven.plugins maven-compiler-plugin 2.5.1 1.5 1.5 org.codehaus.mojo build-helper-maven-plugin 1.7 add-source generate-sources add-source src/main/gen-java org.eclipse.m2e lifecycle-mapping 1.0.0 org.apache.avro avro-maven-plugin [1.6.1,) idl-protocol protocol schema ================================================ FILE: readme.markdown ================================================ Sparrow Scheduler ================================ Sparrow 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. To read more about Sparrow, check out our [paper](http://dl.acm.org/citation.cfm?doid=2517349.2522716). If you're interested in using Sparrow, we recommend that you join the [Sparrow mailing list](https://groups.google.com/group/sparrow-scheduler-users). Code Layout ------------------------- `/sparrow/src` (maven-style source directory) `/sparrow/src/main/java/edu/berkeley/sparrow` (most of the interesting java code) `/sparrow/src/main/java/edu/berkeley/sparrow/examples` (Example applications that use Sparrow) `/deploy/` (contains ec2 deployment scripts) Building Sparrow ------------------------- You can build Sparrow using Maven:
$ mvn compile
$ mvn package -Dmaven.test.skip=true
Sparrow and Spark ------------------------ We 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. Research ------------------------- Sparrow 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. ================================================ FILE: simulation/run_simulation.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import simulation_random import simulation_batch import simulation_centralized import simulation_multi import simulation_cancellation import util def get_percentile(N, percent, key=lambda x:x): if not N: return 0 k = (len(N) - 1) * percent f = math.floor(k) c = math.ceil(k) if f == c: return key(N[int(k)]) d0 = key(N[int(f)]) * (c-k) d1 = key(N[int(c)]) * (k-f) return d0 + d1 NUM_JOBS = 10000 DISTRIBUTION = util.TaskDistributions.EXP_JOBS loads = [0.1, 0.3, 0.5, 0.7, 0.8, 0.9, 0.95] #loads = [0.95] loads.reverse() for load in loads: print "Running simulations at %s load" % load print "******Multiget" s = simulation_multi.Simulation(NUM_JOBS, "multi_tasks_%s" % load, load, DISTRIBUTION) s.run() print "Sparrow" simulation_cancellation.WORK_STEALING = False simulation_cancellation.CANCELLATION = False s = simulation_cancellation.Simulation(NUM_JOBS, "sparrow_%s" % load, load, DISTRIBUTION) s.run() print "Cancellation" simulation_cancellation.WORK_STEALING = False simulation_cancellation.CANCELLATION = True s = simulation_cancellation.Simulation(NUM_JOBS, "cancellation_%s" % load, load, DISTRIBUTION) s.run() print "Centralized" s = simulation_centralized.Simulation(NUM_JOBS, "centralized_%s" % load, load, DISTRIBUTION) s.run() print "Random" s = simulation_random.Simulation(NUM_JOBS, "random_%s" % load, load, DISTRIBUTION) s.run() print "Per task" simulation_batch.PER_TASK = True s = simulation_batch.Simulation(NUM_JOBS, "per_task_%s" % load, load, DISTRIBUTION) s.run() print "Batch sampling" simulation_batch.PER_TASK = False s = simulation_batch.Simulation(NUM_JOBS, "batch_%s" % load, load, DISTRIBUTION) s.run() continue print "Work Stealing (10000 schedulers)" simulation_cancellation.WORK_STEALING = True simulation_cancellation.NUM_SCHEDULERS = 10000 simulation_cancellation.CANCELLATION = False s = simulation_cancellation.Simulation(NUM_JOBS, "stealing_s10000_%s" % load, load, DISTRIBUTION) s.run() continue ================================================ FILE: simulation/simulation.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import logging import math import numpy import random from util import Job, TaskDistributions import Queue MEDIAN_TASK_DURATION = 100 NETWORK_DELAY = 0 TASKS_PER_JOB = 500 SLOTS_PER_WORKER = 4 TOTAL_WORKERS = 10000 PROBE_RATIO = 2 def get_percentile(N, percent, key=lambda x:x): if not N: return 0 k = (len(N) - 1) * percent f = math.floor(k) c = math.ceil(k) if f == c: return key(N[int(k)]) d0 = key(N[int(f)]) * (c-k) d1 = key(N[int(c)]) * (k-f) return d0 + d1 def plot_cdf(values, filename): values.sort() f = open(filename, "w") for percent in range(100): fraction = percent / 100. f.write("%s\t%s\n" % (fraction, get_percentile(values, fraction))) f.close() class Event(object): """ Abstract class representing events. """ def __init__(self): raise NotImplementedError("Event is an abstract class and cannot be " "instantiated directly") def run(self, current_time): """ Returns any events that should be added to the queue. """ raise NotImplementedError("The run() method must be implemented by " "each class subclassing Event") class JobArrival(Event): """ Event to signify a job arriving at a scheduler. """ def __init__(self, simulation, interarrival_delay, task_distribution): self.simulation = simulation self.interarrival_delay = interarrival_delay self.task_distribution= task_distribution def run(self, current_time): job = Job(TASKS_PER_JOB, current_time, self.task_distribution, MEDIAN_TASK_DURATION) logging.getLogger("sim").debug("Job %s arrived at %s" % (job.id, current_time)) # Schedule job. new_events = self.simulation.send_probes(job, current_time) # Add new Job Arrival event, for the next job to arrive after this one. arrival_delay = random.expovariate(1.0 / self.interarrival_delay) new_events.append((current_time + arrival_delay, self)) logging.getLogger("sim").debug("Retuning %s events" % len(new_events)) return new_events class ProbeEvent(Event): """ Event to signify a probe arriving at a worker. """ def __init__(self, worker, job_id): self.worker = worker self.job_id = job_id def run(self, current_time): logging.getLogger("sim").debug("Probe for job %s arrived at worker %s at %s" % (self.job_id, self.worker.id, current_time)) return self.worker.add_probe(self.job_id, current_time) class NoopGetTaskResponseEvent(Event): """ Signifies when a getTask() RPC response arrives at a worker, with a noop response. """ def __init__(self, worker): self.worker = worker def run(self, current_time): logging.getLogger("sim").debug("getTask() request for worker %s returned no task at %s" % (self.worker.id, current_time)) return self.worker.free_slot(current_time) class TaskEndEvent(): def __init__(self, worker): self.worker = worker def run(self, current_time): return self.worker.free_slot(current_time) class Worker(object): def __init__(self, simulation, num_slots, id): self.simulation = simulation self.free_slots = num_slots # Just a list of job ids! self.queued_probes = Queue.Queue() self.id = id self.probes_replied_to_immediately = 0 def add_probe(self, job_id, current_time): self.queued_probes.put(job_id) new_events = self.maybe_get_task(current_time) self.probes_replied_to_immediately += len(new_events) logging.getLogger("sim").debug("Worker %s: %s" % (self.id, self.probes_replied_to_immediately)) return new_events def free_slot(self, current_time): """ Frees a slot on the worker and attempts to launch another task in that slot. """ self.free_slots += 1 get_task_events = self.maybe_get_task(current_time) return get_task_events def maybe_get_task(self, current_time): if not self.queued_probes.empty() and self.free_slots > 0: # Account for "running" task self.free_slots -= 1 job_id = self.queued_probes.get() task_duration = self.simulation.get_task(job_id) probe_response_time = current_time + 2*NETWORK_DELAY if task_duration > 0: task_end_time = probe_response_time + task_duration logging.getLogger("sim").debug(("Task for job %s running on worker %s (get task at: %s, duration: " "%s, end: %s)") % (job_id, self.id, current_time, task_duration, task_end_time)) self.simulation.add_task_completion_time(job_id, task_end_time) new_event = TaskEndEvent(self) return [(task_end_time, new_event)] else: # There was no task left for the job, so send another probe # after 1RTT. logging.getLogger("sim").debug("Noop returning on worker %s at %s" % (self.id, probe_response_time)) return [(probe_response_time, NoopGetTaskResponseEvent(self))] return [] class Simulation(object): def __init__(self, num_jobs, file_prefix, load, task_distribution): avg_used_slots = load * SLOTS_PER_WORKER * TOTAL_WORKERS self.interarrival_delay = (1.0 * MEDIAN_TASK_DURATION * TASKS_PER_JOB / avg_used_slots) print ("Interarrival delay: %s (avg slots in use: %s)" % (self.interarrival_delay, avg_used_slots)) self.jobs = {} self.remaining_jobs = num_jobs self.event_queue = Queue.PriorityQueue() self.workers = [] self.file_prefix = file_prefix while len(self.workers) < TOTAL_WORKERS: self.workers.append(Worker(self, SLOTS_PER_WORKER, len(self.workers))) self.worker_indices = range(TOTAL_WORKERS) self.task_distribution = task_distribution def send_probes(self, job, current_time): """ Send probes to acquire load information, in order to schedule a job. """ self.jobs[job.id] = job random.shuffle(self.worker_indices) probe_events = [] num_probes = PROBE_RATIO * len(job.unscheduled_tasks) for worker_index in self.worker_indices[:num_probes]: probe_events.append((current_time + NETWORK_DELAY, ProbeEvent(self.workers[worker_index], job.id))) return probe_events def get_task(self, job_id): job = self.jobs[job_id] if len(job.unscheduled_tasks) > 0: task_duration = job.unscheduled_tasks[0] job.unscheduled_tasks = job.unscheduled_tasks[1:] return task_duration return -1 def add_task_completion_time(self, job_id, completion_time): job_complete = self.jobs[job_id].task_completed(completion_time) if job_complete: self.remaining_jobs -= 1 logging.getLogger("sim").debug("Job %s completed in %s" % (job_id, self.jobs[job_id].end_time - self.jobs[job_id].start_time)) def run(self): self.event_queue.put((0, JobArrival(self, self.interarrival_delay, self.task_distribution))) last_time = 0 while self.remaining_jobs > 0: current_time, event = self.event_queue.get() assert current_time >= last_time last_time = current_time new_events = event.run(current_time) for new_event in new_events: self.event_queue.put(new_event) print ("Simulation ended after %s milliseconds (%s jobs started)" % (last_time, len(self.jobs))) complete_jobs = [j for j in self.jobs.values() if j.completed_tasks_count == j.num_tasks] print "%s complete jobs" % len(complete_jobs) response_times = [job.end_time - job.start_time for job in complete_jobs if job.start_time > 500] print "Included %s jobs" % len(response_times) plot_cdf(response_times, "%s_response_times.data" % self.file_prefix) print "Average response time: ", numpy.mean(response_times) longest_tasks = [job.longest_task for job in complete_jobs] plot_cdf(longest_tasks, "%s_ideal_response_time.data" % self.file_prefix) tasks_replied_to_immediately = sum([w.probes_replied_to_immediately for w in self.workers]) print "Tasks replied to immeiately: ", tasks_replied_to_immediately return response_times def main(): random.seed(1) logging.basicConfig(level=logging.INFO) sim = Simulation(1000, "sparrow", 0.95, TaskDistributions.CONSTANT) sim.run() if __name__ == "__main__": main() ================================================ FILE: simulation/simulation_batch.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import math import numpy import random import Queue from util import Job, TaskDistributions MEDIAN_TASK_DURATION = 100 NETWORK_DELAY = 0.5 TASKS_PER_JOB = 100 # This needs to be set! SLOTS_PER_WORKER = 4 TOTAL_WORKERS = 10000 PROBE_RATIO = 2 # Whether to do per-task assignment. PER_TASK = True def get_percentile(N, percent, key=lambda x:x): if not N: return 0 k = (len(N) - 1) * percent f = math.floor(k) c = math.ceil(k) if f == c: return key(N[int(k)]) d0 = key(N[int(f)]) * (c-k) d1 = key(N[int(c)]) * (k-f) return d0 + d1 def plot_cdf(values, filename): values.sort() f = open(filename, "w") for percent in range(100): fraction = percent / 100. f.write("%s\t%s\n" % (fraction, get_percentile(values, fraction))) f.close() class Event(object): """ Abstract class representing events. """ def __init__(self): raise NotImplementedError("Event is an abstract class and cannot be " "instantiated directly") def run(self, current_time): """ Returns any events that should be added to the queue. """ raise NotImplementedError("The run() method must be implemented by " "each class subclassing Event") class JobArrival(Event): """ Event to signify a job arriving at a scheduler. """ def __init__(self, simulation, interarrival_delay, task_distribution): self.simulation = simulation self.interarrival_delay = interarrival_delay self.task_distribution = task_distribution def run(self, current_time): job = Job(TASKS_PER_JOB, current_time, self.task_distribution, MEDIAN_TASK_DURATION) #print "Job %s arrived at %s" % (job.id, current_time) # Schedule job. probe_event = self.simulation.send_probes(job, current_time) # Add new Job Arrival event, for the next job to arrive after this one. arrival_delay = random.expovariate(1.0 / self.interarrival_delay) job_arrival_event = (current_time + arrival_delay, self) return [probe_event, job_arrival_event] class ProbeEvent(Event): """ Event to signify all probes for a job arriving at all probed workers. Probed workers are selected when the probes "arrive" (i.e., in the run method).""" def __init__(self, simulation, job_id): self.simulation = simulation self.job_id = job_id def run(self, current_time): task_arrival_events = [] if PER_TASK: task_arrival_events = self.simulation.assign_tasks_per_task(current_time, self.job_id) else: task_arrival_events = self.simulation.assign_tasks(current_time, self.job_id) assert (len(task_arrival_events) == self.simulation.jobs[self.job_id].num_tasks) return task_arrival_events class TaskArrival(Event): """ Event to signify a task arriving at a worker. """ def __init__(self, worker, task_duration, job_id): self.worker = worker self.task_duration = task_duration self.job_id = job_id def run(self, current_time): return self.worker.add_task(current_time, self.task_duration, self.job_id) class TaskEndEvent(): def __init__(self, worker): self.worker = worker def run(self, current_time): return self.worker.free_slot(current_time) class Worker(object): def __init__(self, simulation, num_slots, id): self.simulation = simulation self.free_slots = num_slots # Just a list of (task duration, job id) pairs. self.queued_tasks = Queue.Queue() self.num_queued_tasks = 0 self.id = id def queue_length(self): queue_length = self.num_queued_tasks if self.free_slots > 0: assert self.num_queued_tasks == 0 return -self.free_slots return queue_length def add_task(self, current_time, task_duration, job_id): self.queued_tasks.put((task_duration, job_id)) self.num_queued_tasks += 1 return self.maybe_start_task(current_time) def free_slot(self, current_time): """ Frees a slot on the worker and attempts to launch another task in that slot. """ self.free_slots += 1 get_task_events = self.maybe_start_task(current_time) return get_task_events def maybe_start_task(self, current_time): if not self.queued_tasks.empty() and self.free_slots > 0: # Account for "running" task self.free_slots -= 1 task_duration, job_id = self.queued_tasks.get() self.num_queued_tasks -= 1 task_end_time = current_time + task_duration #print ("Task for job %s on worker %s launched at %s; will complete at %s" % # (job_id, self.id, current_time, task_end_time)) self.simulation.add_task_completion_time(job_id, task_end_time) return [(task_end_time, TaskEndEvent(self))] return [] class Simulation(object): def __init__(self, num_jobs, file_prefix, load, task_distribution): avg_used_slots = load * SLOTS_PER_WORKER * TOTAL_WORKERS self.interarrival_delay = (1.0 * MEDIAN_TASK_DURATION * TASKS_PER_JOB / avg_used_slots) print ("Interarrival delay: %s (avg slots in use: %s)" % (self.interarrival_delay, avg_used_slots)) self.jobs = {} self.remaining_jobs = num_jobs self.event_queue = Queue.PriorityQueue() self.workers = [] self.file_prefix = file_prefix while len(self.workers) < TOTAL_WORKERS: self.workers.append(Worker(self, SLOTS_PER_WORKER, len(self.workers))) self.worker_indices = range(TOTAL_WORKERS) self.task_distribution = task_distribution def assign_tasks(self, current_time, job_id): # Randomly choose workers #(note that this doesn't have to be done until the probe "arrives"). job = self.jobs[job_id] random.shuffle(self.worker_indices) num_probes = PROBE_RATIO * job.num_tasks loads = [(i, self.workers[i].queue_length()) for i in self.worker_indices[:num_probes]] loads.sort(key = lambda x: x[1]) #loads_str = ", ".join(["%s:%s" % (l[0], l[1]) for l in loads]) # Assign tasks task_arrival_events = [] for i, (worker_index, load) in enumerate(loads[:job.num_tasks]): #print ("Assigning task of duration %s for job %s to %s" % # (job.unscheduled_tasks[i], job_id, worker_index)) task_arrival_events.append( (current_time + 2*NETWORK_DELAY, TaskArrival(self.workers[worker_index], job.unscheduled_tasks[i], job_id))) return task_arrival_events def assign_tasks_per_task(self, current_time, job_id): """ Non-generously does per-task sampling.""" job = self.jobs[job_id] random.shuffle(self.worker_indices) task_arrival_events = [] for i, task_duration in enumerate(job.unscheduled_tasks): loads = [(i, self.workers[i].queue_length()) for i in self.worker_indices[PROBE_RATIO*i:PROBE_RATIO*(i+1)]] #loads_str = ", ".join(["%s:%s" % (l[0], l[1]) for l in loads]) #print "Loads: %s" % loads_str loads.sort(key = lambda x: x[1]) #print ("Assigning task of duration %s for job %s to worker %s" % # (task_duration, job_id, loads[0][0])) task_arrival_events.append( (current_time + 2*NETWORK_DELAY, TaskArrival(self.workers[loads[0][0]], task_duration, job_id))) return task_arrival_events def send_probes(self, job, current_time): """ Send probes to acquire load information, in order to schedule a job. """ self.jobs[job.id] = job return (current_time + NETWORK_DELAY, ProbeEvent(self, job.id)) def add_task_completion_time(self, job_id, completion_time): job_complete = self.jobs[job_id].task_completed(completion_time) if job_complete: self.remaining_jobs -= 1 def run(self): self.event_queue.put((0, JobArrival(self, self.interarrival_delay, self.task_distribution))) last_time = 0 while self.remaining_jobs > 0: current_time, event = self.event_queue.get() assert current_time >= last_time last_time = current_time new_events = event.run(current_time) for new_event in new_events: self.event_queue.put(new_event) print ("Simulation ended after %s milliseconds (%s jobs started)" % (last_time, len(self.jobs))) complete_jobs = [j for j in self.jobs.values() if j.completed_tasks_count == j.num_tasks] print "%s complete jobs" % len(complete_jobs) response_times = [job.end_time - job.start_time for job in complete_jobs if job.start_time > 500] print "Included %s jobs" % len(response_times) plot_cdf(response_times, "%s_response_times.data" % self.file_prefix) print "Average response time: ", numpy.mean(response_times) longest_tasks = [job.longest_task for job in complete_jobs] plot_cdf(longest_tasks, "%s_ideal_response_time.data" % self.file_prefix) return response_times def main(): sim = Simulation(10, "per_task", 0.9, TaskDistributions.CONSTANT) sim.run() if __name__ == "__main__": main() ================================================ FILE: simulation/simulation_cancellation.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import logging import math import numpy import random import Queue from util import Job, TaskDistributions MEDIAN_TASK_DURATION = 100 NETWORK_DELAY = 0.5 TASKS_PER_JOB = 100 SLOTS_PER_WORKER = 4 TOTAL_WORKERS = 10000 PROBE_RATIO = 2 CANCELLATION = False WORK_STEALING = False NUM_SCHEDULERS = 1 def get_percentile(N, percent, key=lambda x:x): if not N: return 0 k = (len(N) - 1) * percent f = math.floor(k) c = math.ceil(k) if f == c: return key(N[int(k)]) d0 = key(N[int(f)]) * (c-k) d1 = key(N[int(c)]) * (k-f) return d0 + d1 def plot_cdf(values, filename): values.sort() f = open(filename, "w") for percent in range(100): fraction = percent / 100. f.write("%s\t%s\n" % (fraction, get_percentile(values, fraction))) f.close() class Event(object): """ Abstract class representing events. """ def __init__(self): raise NotImplementedError("Event is an abstract class and cannot be " "instantiated directly") def run(self, current_time): """ Returns any events that should be added to the queue. """ raise NotImplementedError("The run() method must be implemented by " "each class subclassing Event") class JobArrival(Event): """ Event to signify a job arriving at a scheduler. """ def __init__(self, simulation, interarrival_delay, task_distribution): self.simulation = simulation self.interarrival_delay = interarrival_delay self.task_distribution = task_distribution def run(self, current_time): scheduler = random.randint(0, NUM_SCHEDULERS - 1) job = Job(TASKS_PER_JOB, current_time, self.task_distribution, MEDIAN_TASK_DURATION, scheduler) #print "Job %s arrived at %s" % (job.id, current_time) # Schedule job. new_events = self.simulation.send_probes(job, current_time) # Add new Job Arrival event, for the next job to arrive after this one. arrival_delay = random.expovariate(1.0 / self.interarrival_delay) new_events.append((current_time + arrival_delay, self)) #print "Retuning %s events" % len(new_events) return new_events class ProbeEvent(Event): """ Event to signify a probe arriving at a worker. """ def __init__(self, worker, job_id): self.worker = worker self.job_id = job_id def run(self, current_time): #print ("Probe for job %s arrived at worker %s at %s" % # (self.job_id, self.worker.id, current_time)) return self.worker.add_probe(self.job_id, current_time) class NoopGetTaskResponseEvent(Event): """ Signifies when a getTask() RPC response arrives at a worker, with a noop response. """ def __init__(self, worker): self.worker = worker def run(self, current_time): #print ("getTask() request for worker %s returned no task at %s" % # (self.worker.id, current_time)) return self.worker.free_slot(current_time) class TaskEndEvent(): def __init__(self, worker): self.worker = worker def run(self, current_time): return self.worker.free_slot(current_time) class CancellationEvent(): def __init__(self, worker, job_id): self.worker = worker self.job_id = job_id def run(self, current_time): self.worker.cancel_probe(self.job_id, current_time) return [] class Worker(object): def __init__(self, simulation, num_slots, id): self.simulation = simulation # List of times when slots were freed, for each free slot (used to track the time # the worker spends idle). self.free_slots = [] while len(self.free_slots) < num_slots: self.free_slots.append(0) self.idle_ms = 0 # Just a list of job ids! self.queued_probes = [] self.id = id self.successful_cancellations = 0 def add_probe(self, job_id, current_time): self.queued_probes.append(job_id) return self.maybe_get_task(current_time) def free_slot(self, current_time): """ Frees a slot on the worker and attempts to launch another task in that slot. """ self.free_slots.append(current_time) get_task_events = self.maybe_get_task(current_time) if len(get_task_events) > 0: return get_task_events if WORK_STEALING: # Choose a random scheduler. scheduler = random.randint(0, NUM_SCHEDULERS - 1) time_slot_freed = self.free_slots.pop(0) self.idle_ms += current_time - time_slot_freed new_task_events = self.simulation.get_any_task(self, scheduler, current_time) assert len(new_task_events) >= 1 return new_task_events return [] def maybe_get_task(self, current_time): if len(self.queued_probes) > 0 and len(self.free_slots) > 0: # Account for "running" task time_slot_freed = self.free_slots.pop(0) self.idle_ms += current_time - time_slot_freed job_id = self.queued_probes[0] self.queued_probes = self.queued_probes[1:] return self.simulation.get_task(job_id, self, current_time) return [] def cancel_probe(self, job_id, current_time): logging.debug("Attempting to cancel probe for job %s on worker %s (queue: %s) at %s" % (job_id, self.id, self.queued_probes, current_time)) if job_id in self.queued_probes: self.queued_probes.remove(job_id) self.successful_cancellations += 1 def finish_simulation(self, current_time): """ Completes the simulation by adding the idle time at the end. """ for time_freed in self.free_slots: self.idle_ms += time_freed - current_time class Simulation(object): def __init__(self, num_jobs, file_prefix, load, task_distribution): avg_used_slots = load * SLOTS_PER_WORKER * TOTAL_WORKERS self.interarrival_delay = (1.0 * MEDIAN_TASK_DURATION * TASKS_PER_JOB / avg_used_slots) print ("Interarrival delay: %s (avg slots in use: %s)" % (self.interarrival_delay, avg_used_slots)) self.jobs = {} self.unscheduled_jobs = [] while len(self.unscheduled_jobs) < NUM_SCHEDULERS: self.unscheduled_jobs.append([]) self.remaining_jobs = num_jobs self.event_queue = Queue.PriorityQueue() self.workers = [] self.file_prefix = file_prefix while len(self.workers) < TOTAL_WORKERS: self.workers.append(Worker(self, SLOTS_PER_WORKER, len(self.workers))) self.worker_indices = range(TOTAL_WORKERS) self.task_distribution = task_distribution self.tasks_stolen = 0 self.attempted_tasks_stolen = 0 self.attempted_cancellations = 0 self.successful_get_tasks = 0 self.total_get_tasks = 0 def send_probes(self, job, current_time): """ Send probes to acquire load information, in order to schedule a job. """ self.jobs[job.id] = job self.unscheduled_jobs[job.scheduler].append(job) random.shuffle(self.worker_indices) probe_events = [] num_probes = PROBE_RATIO * len(job.unscheduled_tasks) for worker_index in self.worker_indices[:num_probes]: probe_events.append((current_time + NETWORK_DELAY, ProbeEvent(self.workers[worker_index], job.id))) job.probed_workers.add(worker_index) return probe_events def get_task(self, job_id, worker, current_time): self.total_get_tasks += 1 job = self.jobs[job_id] # Need to add a network delay here to account for the fact that we # call get_task when the probe is launched (not when it is received) to # avoid additional event processing. job.add_probe_response(worker, current_time + NETWORK_DELAY) response_time = current_time + 2*NETWORK_DELAY if len(job.unscheduled_tasks) > 0: self.successful_get_tasks += 1 return self.get_task_for_job(job, worker, response_time) else: return [(response_time, NoopGetTaskResponseEvent(worker))] def get_task_for_job(self, job, worker, response_time): assert len(job.unscheduled_tasks) > 0 events = [] task_duration = job.unscheduled_tasks.pop(0) task_end_time = task_duration + response_time self.add_task_completion_time(job.id, task_end_time) # Remove this worker from the list of the job's probed workers. events.append((task_end_time, TaskEndEvent(worker))) if len(job.unscheduled_tasks) == 0: logging.info("Finished scheduling tasks for job %s" % job.id) self.unscheduled_jobs[job.scheduler].remove(job) if CANCELLATION: # Cancel remaining outstanding probes. logging.debug("Cancelling probes for job %s (will arrive at %s)" % (job.id, response_time)) for worker_id in job.probed_workers: self.attempted_cancellations += 1 events.append((response_time, CancellationEvent(self.workers[worker_id], job.id))) return events def get_any_task(self, worker, scheduler, current_time): """ Used by an idle worker, to attempt to steal extra work.""" self.attempted_tasks_stolen += 1 response_time = current_time + 2*NETWORK_DELAY unscheduled_jobs = self.unscheduled_jobs[scheduler] if len(unscheduled_jobs) == 0: return [(response_time, NoopGetTaskResponseEvent(worker))] self.tasks_stolen += 1 return self.get_task_for_job(unscheduled_jobs[0], worker, response_time) def add_task_completion_time(self, job_id, completion_time): job_complete = self.jobs[job_id].task_completed(completion_time) if job_complete: self.remaining_jobs -= 1 #print ("Job %s completed in %s" % # (job_id, self.jobs[job_id].end_time - self.jobs[job_id].start_time)) def run(self): self.event_queue.put((0, JobArrival(self, self.interarrival_delay, self.task_distribution))) last_time = 0 last_report = self.remaining_jobs half_jobs = self.remaining_jobs / 2 output_worker_loads = False while self.remaining_jobs > 0: #if self.remaining_jobs != last_report and self.remaining_jobs % 100 == 0: # print self.remaining_jobs, "jobs remaining" # last_report = self.remaining_jobs # At a point in the middle of the experiment, get the distribution of tasks # on each worker. if not output_worker_loads and self.remaining_jobs == half_jobs: worker_loads = [len(w.free_slots) for w in self.workers] plot_cdf(worker_loads, "%s_worker_loads.data" % self.file_prefix) output_worker_loads = True current_time, event = self.event_queue.get() assert current_time >= last_time last_time = current_time new_events = event.run(current_time) for new_event in new_events: self.event_queue.put(new_event) for worker in self.workers: worker.finish_simulation(last_time) total_slot_ms = len(self.workers) * SLOTS_PER_WORKER * last_time total_idle_ms = sum([x.idle_ms for x in self.workers]) fraction_idle = total_idle_ms * 1.0 / total_slot_ms rtt = 2 * NETWORK_DELAY total_failed_get_task_ms = (self.total_get_tasks - self.successful_get_tasks) * rtt fraction_failed_get_task = total_failed_get_task_ms * 1.0 / total_slot_ms total_failed_stolen_ms = (self.attempted_tasks_stolen - self.tasks_stolen) * rtt fraction_failed_stolen = total_failed_stolen_ms * 1.0 / total_slot_ms total_successful_get_task_ms = self.successful_get_tasks * rtt fraction_successful_get_task = total_successful_get_task_ms * 1.0 / total_slot_ms total_successful_stolen_ms = self.tasks_stolen * 2 * NETWORK_DELAY fraction_successful_stolen = total_successful_stolen_ms * 1.0 / total_slot_ms print (("Idle time: %s (%s), failed get task time: %s (%s), failed steals time: %s (%s), " "successful GetTask()s: %s (%s), successful steals: %s (%s), (total: %s)") % (total_idle_ms, fraction_idle, total_failed_get_task_ms, fraction_failed_get_task, total_failed_stolen_ms, fraction_failed_stolen, total_successful_get_task_ms, fraction_successful_get_task, total_successful_stolen_ms, fraction_successful_stolen, fraction_idle + fraction_failed_get_task + fraction_failed_stolen + fraction_successful_get_task + fraction_successful_stolen)) print ("Simulation ended after %s milliseconds (%s jobs started, %s tasks stolen)" % (last_time, len(self.jobs), self.tasks_stolen)) total_successful_cancellations = sum([x.successful_cancellations for x in self.workers]) print ("%s/%s cancellations successful" % (total_successful_cancellations, self.attempted_cancellations)) tasks_stolen_file = open("%s_tasks_stolen" % self.file_prefix, "w") tasks_stolen_file.write("Attempts: %s, successes: %s\n" % (self.attempted_tasks_stolen, self.tasks_stolen)) tasks_stolen_file.close() complete_jobs = [j for j in self.jobs.values() if j.completed_tasks_count == j.num_tasks] print "%s complete jobs" % len(complete_jobs) response_times = [job.end_time - job.start_time for job in complete_jobs if job.start_time > 500] print "Included %s jobs" % len(response_times) plot_cdf(response_times, "%s_response_times.data" % self.file_prefix) print "Average response time: ", numpy.mean(response_times) wait_times = [j.time_all_tasks_scheduled - j.start_time for j in complete_jobs if j.start_time > 500] plot_cdf(wait_times, "%s_wait_times.data" % self.file_prefix) print "Average wait time: ", numpy.mean(wait_times) num_no_wait_jobs = len([w for w in wait_times if w == 2 * NETWORK_DELAY]) frac_no_wait_jobs = num_no_wait_jobs * 1.0 / len(complete_jobs) print "No wait jobs: %s/%s (%f)" % (num_no_wait_jobs, len(complete_jobs), frac_no_wait_jobs) cancellation_time_window = [job.last_probe_reply_time - job.time_all_tasks_scheduled for job in complete_jobs] plot_cdf(cancellation_time_window, "%s_cancellation_window.data" % self.file_prefix) longest_tasks = [job.longest_task for job in complete_jobs] plot_cdf(longest_tasks, "%s_ideal_response_time.data" % self.file_prefix) return response_times def main(): logging.basicConfig(level=logging.ERROR) sim = Simulation(5000, "test", 0.8, TaskDistributions.EXP_JOBS) sim.run() if __name__ == "__main__": main() ================================================ FILE: simulation/simulation_centralized.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # """ Simulates a central scheduler with a complete cluster view. """ import logging import math import numpy import random import Queue from util import Job, TaskDistributions MEDIAN_TASK_DURATION = 100 NETWORK_DELAY = 0.5 TASKS_PER_JOB = 100 SLOTS_PER_WORKER = 4 TOTAL_WORKERS = 10000 def get_percentile(N, percent, key=lambda x:x): if not N: return 0 k = (len(N) - 1) * percent f = math.floor(k) c = math.ceil(k) if f == c: return key(N[int(k)]) d0 = key(N[int(f)]) * (c-k) d1 = key(N[int(c)]) * (k-f) return d0 + d1 def plot_cdf(values, filename): values.sort() f = open(filename, "w") for percent in range(100): fraction = percent / 100. f.write("%s\t%s\n" % (fraction, get_percentile(values, fraction))) f.close() class Event(object): """ Abstract class representing events. """ def __init__(self): raise NotImplementedError("Event is an abstract class and cannot be " "instantiated directly") def run(self, current_time): """ Returns any events that should be added to the queue. """ raise NotImplementedError("The run() method must be implemented by " "each class subclassing Event") class JobArrival(Event): """ Event to signify a job arriving at a scheduler. """ def __init__(self, simulation, interarrival_delay, task_distribution): self.simulation = simulation self.interarrival_delay = interarrival_delay self.task_distribution = task_distribution def run(self, current_time): job = Job(TASKS_PER_JOB, current_time, self.task_distribution, MEDIAN_TASK_DURATION) #print "Job %s arrived at %s" % (job.id, current_time) # Schedule job. new_events = self.simulation.schedule_tasks(job, current_time) # Add new Job Arrival event, for the next job to arrive after this one. arrival_delay = random.expovariate(1.0 / self.interarrival_delay) new_events.append((current_time + arrival_delay, self)) #print "Retuning %s events" % len(new_events) return new_events class TaskEndEvent(): """ This event is used to signal to the scheduler that a slot is free (so should include the RTT to notify the scheduler). """ def __init__(self, simulation): self.simulation = simulation def run(self, current_time): return self.simulation.free_slot(current_time) class Simulation(object): def __init__(self, num_jobs, file_prefix, load, task_distribution): avg_used_slots = load * SLOTS_PER_WORKER * TOTAL_WORKERS self.interarrival_delay = (1.0 * MEDIAN_TASK_DURATION * TASKS_PER_JOB / avg_used_slots) print ("Interarrival delay: %s (avg slots in use: %s)" % (self.interarrival_delay, avg_used_slots)) self.jobs = {} self.remaining_jobs = num_jobs self.event_queue = Queue.PriorityQueue() self.num_free_slots = TOTAL_WORKERS * SLOTS_PER_WORKER self.unscheduled_jobs = [] self.file_prefix = file_prefix self.task_distribution = task_distribution def schedule_tasks(self, job, current_time): self.jobs[job.id] = job self.unscheduled_jobs.append(job) #print "Job %s arrived at %s" % (job.id, current_time) return self.maybe_launch_tasks(current_time) def maybe_launch_tasks(self, current_time): task_end_events = [] while self.num_free_slots > 0 and len(self.unscheduled_jobs) > 0: self.num_free_slots -= 1 job = self.unscheduled_jobs[0] task_duration = job.unscheduled_tasks[0] job.unscheduled_tasks = job.unscheduled_tasks[1:] if len(job.unscheduled_tasks) == 0: logging.info("Finished scheduling tasks for job %s" % job.id) #print ("Launching task for job %s at %s (duration %s); %s remaining slots" % # (job.id, current_time + NETWORK_DELAY, task_duration, self.num_free_slots)) task_end_time = current_time + task_duration + NETWORK_DELAY scheduler_notify_time = task_end_time + NETWORK_DELAY task_end_events.append((scheduler_notify_time, TaskEndEvent(self))) job_complete = job.task_completed(task_end_time) if job_complete: #print "Completed job %s in %s" % (job.id, job.end_time - job.start_time) self.remaining_jobs -= 1 self.unscheduled_jobs = self.unscheduled_jobs[1:] return task_end_events def free_slot(self, current_time): self.num_free_slots += 1 return self.maybe_launch_tasks(current_time) def run(self): self.event_queue.put((0, JobArrival(self, self.interarrival_delay, self.task_distribution))) last_time = 0 while self.remaining_jobs > 0: current_time, event = self.event_queue.get() assert current_time >= last_time last_time = current_time new_events = event.run(current_time) for new_event in new_events: self.event_queue.put(new_event) print ("Simulation ended after %s milliseconds (%s jobs started)" % (last_time, len(self.jobs))) complete_jobs = [j for j in self.jobs.values() if j.completed_tasks_count == j.num_tasks] print "%s complete jobs" % len(complete_jobs) response_times = [job.end_time - job.start_time for job in complete_jobs if job.start_time > 500] print "Included %s jobs" % len(response_times) plot_cdf(response_times, "%s_response_times.data" % self.file_prefix) print "Average response time: ", numpy.mean(response_times) longest_tasks = [job.longest_task for job in complete_jobs] plot_cdf(longest_tasks, "%s_ideal_response_time.data" % self.file_prefix) return response_times def main(): logging.basicConfig(level=logging.INFO) sim = Simulation(100000, "centralized", 0.95, TaskDistributions.CONSTANT) sim.run() if __name__ == "__main__": main() ================================================ FILE: simulation/simulation_hacked.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # """ All times are in milliseconds. The script takes several parameters specified by PARAMS. Overall layout: There are 3 system components: jobs, front ends, and servers. Front ends are responsible for maintaining the (stale) state for servers, and placing jobs on servers according to some algorithm. The Simulation class handles running the simulation. It adds event objects to an event queue, and runs the simulation until all jobs have completed. Useful data is collected using a StatsManager object. """ import copy import logging import math import os import Queue import random import sys import stats as stats_mod # Log levels LEVELS = {'debug': logging.DEBUG, 'info': logging.INFO, 'warning': logging.WARNING, 'error': logging.ERROR, 'critical': logging.CRITICAL} def get_normalized_list(input_str): """ Returns the comma-separated input string as a normalized list. """ items = input_str.split(",") total = 0.0 for item in items: total += float(item) temp_total = 0 for index, item in enumerate(items): temp_total += float(item) items[index] = temp_total / total return items def get_int_list(input_str): """ Returns the comma-separated input string as a list of integers. """ items = input_str.split(",") for index, item in enumerate(items): items[index] = int(item) return items # Parameters # param name => [convert func, default value] PARAMS = {'num_fes': [int, 1], # number of frontends 'num_servers': [int, 1000], # number of servers # Number of cores per server, which corresponds to the maximum # number of tasks that can be run concurrently. 'cores_per_server': [int, 1], 'num_users': [int, 10], # number of users 'total_time': [int, 1e4], # time over which jobs are arriving # task_distribution describes the distribution of the number of tasks # in a job. Choices are constant (in which case all jobs have # 'num_tasks' tasks) or bimodal, in which case 1/6 of the jobs have # 200 tasks, and the rest have 10 tasks. 'task_distribution': [str, "constant"], # tasks per job (only used for constant distribution) 'num_tasks': [int, 200], # Ratio of number of total probes to number of tasks in each job. -1 # signals that all machines should be probed. 'probes_ratio': [float, 1.], # Options are "poisson" or "uniform". 'job_arrival_distribution': [str, "poisson"], 'task_length': [int, 100], # length of task # Distribution of task lengths. If set to "constant" or # "exponential", tasks will be distributed accordingly, with mean # task_length. If set to "facebook", tasks will be distributed based # on what was observed from the facebook data: 95% of tasks in a job # will have length task_length, and 5% will have length # task_length + x, where x is exponentially distributed with mean # 0.1 * task_length. 'task_length_distribution': [str, "constant"], 'log_level': [str, "info"], 'network_delay': [int, 0], # Network delay 'job_arrival_delay': [float, 40], # Arrival delay on each frontend 'deterministic': [lambda x: x == "True", False], # Use fixed workload 'random_seed': [int, 1], # Seed to use for workload generation 'first_time': [lambda x: x == "True", True], # Whether this is the # first in a series of # trials (used for # writing output files) 'file_prefix': [str, 'results'], 'results_dir': [str, 'raw_results'], # queue_selection choices are "greedy", which places a single task # on each of the n least loaded nodes, and "pack", which # packs multiple tasks on each node to minimize the overall queue # length. 'queue_selection': [str, 'greedy'], # The metric to return when a server is probed for its load. Options # are 'total', which returns the total queue length, 'estimate', # which returns an estimated queue length based on other probes it's # received, and 'per_user_length', which returns the length of the # queue for that particular user, and 'per_user_estimate', which # returns an estimate of when a task for the given user will be run. 'load_metric': [str, 'total'], # Number of machines that each task can run on. Setting this to zero # is equivalent to having unconstrained tasks. 'choices_per_task': [int, 0], # Comma separated list of relative demands for each user. When # creating tasks, they are assigned randomly to users based on these # demands. An empty list (the default) means that all users have equal demand. 'relative_demands': [get_normalized_list, []], # comma separated list of relative weights with which to run tasks # for each user. Currently, only integers are supported. 'relative_weights': [get_int_list, []], # Whether extra queue state should be recorded. 'record_queue_state': [lambda x: x == "True", False], # Whether to record information about individual tasks, including # expected load (based on the probe) and runtime. 'record_task_info': [lambda x: x == "True", False] } def get_param(key): return PARAMS[key][1] def output_params(): results_dirname = get_param('results_dir') f = open(os.path.join(results_dirname, "%s.params" % get_param("file_prefix")), "w") for key, value in PARAMS.items(): f.write("%s: %s\n" % (key, value[1])) f.close() def set_param(key, val): convert_func = PARAMS[key][0] PARAMS[key][1] = convert_func(val) ############################################################################### # Components: Jobs, Servers, oh my! # ############################################################################### class Job(object): """ Represents a job. Attributes: arrival_time: Time the job arrives at the front end. num_tasks: Integer specifying the number of tasks needed for the job. longest_task: Runtime (in ms) of the longest task. """ def __init__(self, user_id, arrival_time, num_tasks, task_length, stats_manager, id_str, servers): self.user_id = user_id self.arrival_time = arrival_time self.first_task_completion = -1 self.completion_time = -1 self.num_tasks = num_tasks self.task_length = task_length self.stats_manager = stats_manager self.id_str = str(id_str) self.tasks_finished = 0 self.longest_task = 0 choices_per_task = get_param("choices_per_task") if choices_per_task > 0: self.constraints = [] for task in range(self.num_tasks): self.constraints.append(random.sample(servers, choices_per_task)) if get_param("record_task_info"): # Expected load (based on the probe) and actual wait time for all # tasks, indexed by the task id. self.probe_results = [] self.wait_times = [] while len(self.probe_results) < self.num_tasks: self.probe_results.append(-1) self.wait_times.append(-1) def get_task_length(self, task_id): """ Returns the time the current task takes to execute. This should only be called once for each task! Otherwise it is likely to return inconsistent results. """ task_length = self.task_length if get_param("task_length_distribution") == "exponential": task_length = random.expovariate(1.0 / self.task_length) elif get_param("task_length_distribution") == "facebook": if random.random() > 0.95: task_length += random.expovariate(10.0 / self.task_length) self.longest_task = max(self.longest_task, task_length) return task_length def record_probe_result(self, task_id, load): """ Records the expected load on the machine for the given task. This function should only be called if the "record_task_info" parameter is true. """ assert get_param("record_task_info") assert task_id < self.num_tasks self.probe_results[task_id] = load def record_wait_time(self, task_id, launch_time): assert get_param("record_task_info") assert task_id < self.num_tasks self.wait_times[task_id] = launch_time - self.arrival_time def task_finished(self, current_time): """ Should be called whenever a task completes. Sends stats to the stats manager. """ if self.tasks_finished == 0: self.first_task_completion = current_time self.tasks_finished += 1 self.stats_manager.task_finished(self.user_id, current_time) if self.tasks_finished == self.num_tasks: self.completion_time = current_time self.stats_manager.job_finished(self) def response_time(self): assert(self.completion_time != -1) return self.completion_time - self.arrival_time def service_time(self): assert(self.completion_time != -1) assert(self.first_task_completion != -1) return self.completion_time - self.first_task_completion def wait_time(self): assert(self.first_task_completion != -1) return self.first_task_completion - self.arrival_time class Server(object): """ Represents a back end server, which runs jobs. """ def __init__(self, id_str, stats_manager, num_users): self.num_users = num_users # List of queues for each user, indexed by the user id. Each queue # contains (job, task_id) pairs. self.queues = [] for user in range(self.num_users): self.queues.append([]) self.num_cores = get_param("cores_per_server") assert self.num_cores >= 1 # Number of currently running tasks. self.running_tasks = 0 self.queued_tasks = 0 # Index of the user whose task was most recently launched. self.current_user = 0 # Count of tasks that have been launched in this scheduling round for # self.current_user. self.task_count = 0 self.id_str = str(id_str) self.stats_manager = stats_manager # An ordered list of probes received for this machine self.probes = [] self.logger = logging.getLogger("Server") #if self.relative_weights == []: # for user in range(self.num_users): # self.relative_weights.append(1) #assert self.num_users == len(self.relative_weights) def __str__(self): return self.id_str def probe_load(self, user_id, current_time): """ Returns the current load on the machine, based on 'load_metric'. """ if get_param("load_metric") == "estimate": probe_start = current_time - 2 * get_param("network_delay") start_index = 0 while start_index < len(self.probes) and \ self.probes[start_index] <= probe_start: start_index += 1 self.probes = self.probes[start_index:] estimated_load = (self.queued_tasks + self.running_tasks + len(self.probes)) self.probes.append(current_time) return estimated_load elif get_param("load_metric") == "per_user_length": return len(self.queues[user_id]) elif get_param("load_metric") == "per_user_estimate": relative_weights = get_param("relative_weights") # First, we compute the number of rounds needed to empty user_id's # queue and run the potential new task. Based on that number of # rounds, we examine the queues for all users to determine how # many tasks will run before the potential task for user_id. # Tasks that will be run before a task for the given user_id # (including any currently running tasks, since we realistically # assume that we don't know when these will complete). total_tasks_before = self.running_tasks # Compute the number of rounds (including the current one) needed to empty # the queue and ultimately run the task for this user. 1 indicates # that the task will be run as part of the current round, and so forth. queue_length = len(self.queues[user_id]) + 1 if self.current_user == user_id: queue_length += self.task_count rounds = math.ceil(float(queue_length) / relative_weights[user_id]) # Whether the user specified by index (below) comes after user_id # in the scheduling round. past_user = False for count in range(len(self.queues)): index = (count + self.current_user) % len(self.queues) if past_user: # The user specified by index comes after user_id, so # there will be one less scheduling round before # index. potential_tasks_before = ((rounds - 1) * relative_weights[index]) else: potential_tasks_before = (rounds * relative_weights[index]) if self.running_tasks > 0 and self.current_user == index: # Account for tasks that have already run in this round. potential_tasks_before -= self.task_count tasks_before = min(len(self.queues[index]), potential_tasks_before) total_tasks_before += tasks_before if index == user_id: past_user = True return total_tasks_before else: return self.queued_tasks + self.running_tasks def queue_task(self, job, task_index, current_time): """ Adds the given job to the queue of tasks. Begins running the task, if there are no other tasks in the queue. Returns a TaskCompletion event, if there are no tasks running. """ self.queued_tasks += 1 self.queues[job.user_id].append((job, task_index)) self.stats_manager.task_queued(job.user_id, current_time) if self.running_tasks < self.num_cores: # Not all cores are in use, so launch this task. return [self.__launch_task(current_time)] def task_finished(self, user_id, current_time): """ Removes the task from the queue, and begins running the next task. Returns a TaskCompletion for the next task, if one exists. """ assert self.running_tasks > 0 self.running_tasks -= 1 if self.queued_tasks > 0: # If there are queued tasks, all but the core just freed should be # in use. assert self.running_tasks == self.num_cores - 1 return [self.__launch_task(current_time)] def __launch_task(self, current_time): """ Launches the next task in the queue on a free core. Returns an event for the launched task's completion. """ assert self.queued_tasks > 0 assert self.running_tasks < self.num_cores self.queued_tasks -= 1 if not len(get_param("relative_weights")) > self.current_user: print get_param("relative_weights"), self.current_user assert False tasks_per_round = get_param("relative_weights")[self.current_user] if self.task_count >= tasks_per_round: # Move on to the next user. self.task_count = 0 self.current_user = (self.current_user + 1) % self.num_users while len(self.queues[self.current_user]) == 0: self.current_user = (self.current_user + 1) % self.num_users self.task_count = 0 # Get the first task from the queue job, task_id = self.queues[self.current_user][0] # Remove the task from the user's queue. self.queues[self.current_user] = self.queues[self.current_user][1:] self.task_count += 1 assert job.user_id == self.current_user task_length = job.get_task_length(task_id) event = (current_time + task_length, TaskCompletion(job, self)) self.stats_manager.task_started(self.current_user, current_time) self.time_started = current_time if get_param("record_task_info"): job.record_wait_time(task_id, current_time) self.running_tasks += 1 return event class ConstraintFrontEnd(object): """ A front end server that handles placing jobs that have constraints. """ def __init__(self, servers, id_str, stats_manager): self.servers = servers self.stats_manager = stats_manager self.id_str = str(id_str) self.probes_per_task = int(math.ceil(get_param("probes_ratio"))) def place_job(self, job, current_time): """ Begins the process of placing the job and returns the probe events. """ assert len(job.constraints) == job.num_tasks candidates = [] for task_constraints in job.constraints: # Machines that aren't already being probed. unused = [s for s in task_constraints if s not in candidates] if len(unused) < self.probes_per_task: candidates.extend(unused) else: candidates.extend(random.sample(unused, self.probes_per_task)) probe_event = Probe(self, job, candidates) return [(current_time + get_param("network_delay"), probe_event)] def probe_completed(self, job, queue_lengths, current_time): """ Sends the job to server(s) based on the result of the probe. Returns the task arrival events. """ events = [] task_arrival_time = current_time + get_param("network_delay") used = {} all_empty_queues = True for counter, task_constraints in enumerate(job.constraints): servers = [s for s in queue_lengths if s[0] in task_constraints] best = min(servers, key=lambda x: x[1]) if best[1] > 0: all_empty_queues = False # Increment the load on the chosen server. Assumes value returned # is in units of one task. queue_lengths.remove(best) queue_lengths.append((best[0], best[1] + 1)) if get_param("record_task_info"): job.record_probe_result(counter, best[1]) events.append((task_arrival_time, TaskArrival(best[0], job, counter))) if all_empty_queues: self.stats_manager.record_job_with_all_empty_queues() return events class FrontEnd(object): """ Represents a front end server, which places jobs. """ def __init__(self, servers, id_str, stats_manager): self.servers = servers self.stats_manager = stats_manager self.id_str = str(id_str) self.logger = logging.getLogger("FrontEnd") def place_job(self, job, current_time): """ Begins the process of placing the job and returns the probe events. """ servers_copy = copy.copy(self.servers) random.shuffle(servers_copy) num_probes = get_param("num_servers") if get_param("probes_ratio") >= 1: num_probes = int(round(job.num_tasks * get_param("probes_ratio"))) assert num_probes <= len(self.servers) candidates = servers_copy[:num_probes] network_delay = get_param("network_delay") probe_event = Probe(self, job, candidates) return [(current_time + network_delay, probe_event)] def probe_completed(self, job, queue_lengths, current_time): """ Sends the job to server(s) based on the result of the probe. Returns the task arrival events. """ events = [] task_arrival_time = current_time + get_param("network_delay") all_empty_queues = True for (counter, (server, length)) in enumerate( self.get_best_n_queues(queue_lengths, job.num_tasks)): if get_param("record_task_info"): job.record_probe_result(counter, length) events.append((task_arrival_time, TaskArrival(server, job, counter))) if length >= get_param("cores_per_server"): all_empty_queues = False #self.logger.debug("\t%d\tAssigning job %s for user %d to %s" % # (current_time, job.id_str, job.user_id, # server.id_str)) if all_empty_queues: self.stats_manager.record_job_with_all_empty_queues() return events def get_best_n_queues(self, queue_lengths, n): """ Given an array of queue lengths, assign n tasks to those queues. Returns a sublist of queue_lengths with the chosen queues. """ queue_lengths.sort(key = lambda k: k[1]) queue_selection = get_param("queue_selection") if queue_selection == "greedy": assert len(queue_lengths) >= n return queue_lengths[:n] elif queue_selection == "pack" or queue_selection == "reverse_pack": # Pack multiple tasks into servers to minimize the longest queue # length. longest_queue = 0 tasks_placed = 0 sublist = [] for i, (server, length) in enumerate(queue_lengths): while length > longest_queue: if queue_selection == "pack": for prev_server, prev_length in queue_lengths[:i]: sublist.append((prev_server, longest_queue)) if queue_selection == "reverse_pack": for prev_server, prev_length in \ reversed(queue_lengths[:i]): sublist.append((prev_server, longest_queue)) longest_queue += 1 if len(sublist) >= n: return sublist[:n] # Distribute jobs over remaining servers while len(sublist) < n: if queue_selection == "pack": for prev_server, prev_length in queue_lengths[:i]: sublist.append((prev_server, longest_queue)) if len(sublist) >= n: return sublist elif queue_selection == "reverse_pack": for prev_server, prev_length in reversed(queue_lengths[:i]): sublist.append((prev_server, longest_queue)) if len(sublist) >= n: return sublist longest_queue += 1 assert(False) elif queue_selection == "patrick": # Longest queue we'd have to place a task in, using the greedy # policy. longest_queue = queue_lengths[n - 1][1] # This is used to store the index of the last queue with length # at MOST longest_queue. last_index = n - 1 while last_index < len(queue_lengths) and \ queue_lengths[last_index][1] <= longest_queue: last_index += 1 return queue_lengths[last_index - n:last_index] # default, return first n queues self.logger.warn("Specified queue parameter, %s, is not a valid option" % queue_selection) return queue_lengths[:n] ############################################################################### # Events # ############################################################################### class Event(object): """ Abstract class representing events. """ def __init__(self): raise NotImplementedError("Event is an abstract class and cannot be " "instantiated directly") def run(self, current_time): """ Returns any events that should be added to the queue. """ raise NotImplementedError("The run() method must be implemented by " "each class subclassing Event") class RecordQueueState(Event): """ Event to periodically record information about the worker queues. """ def __init__(self, servers, stats_manager, query_interval): self.servers = servers self.stats_manager = stats_manager self.query_interval = query_interval def run(self, current_time): queue_lengths = [] for server in self.servers: queue_lengths.append(server.queue_length) self.stats_manager.record_queue_lengths(queue_lengths) return [(current_time + self.query_interval, self)] class JobArrival(Event): """ Event to handle jobs arriving at a front end. """ def __init__(self, job, front_end): self.job = job self.front_end = front_end def run(self, current_time): return self.front_end.place_job(self.job, current_time) class TaskArrival(Event): """ Event to handle a task arriving at a server. """ def __init__(self, server, job, task_index): self.server = server self.job = job self.task_index = task_index def run(self, current_time): return self.server.queue_task(self.job, self.task_index, current_time) class TaskCompletion(Event): """ Event to handle tasks completing. """ def __init__(self, job, server): self.job = job self.server = server def run(self, current_time): self.job.task_finished(current_time) return self.server.task_finished(self.job.user_id, current_time) class Probe(Event): """ Event to probe a list of servers for their current queue length. This event is used for both a probe and a probe reply to avoid copying state to a new event. Whether the queue_lengths variable has been populated determines what type of event it's currently being used for. """ def __init__(self, front_end, job, servers): self.front_end = front_end self.job = job self.servers = servers self.queue_lengths = [] def run(self, current_time): events = [] if len(self.queue_lengths) == 0: # Need to collect state. for server in self.servers: self.queue_lengths.append((server, server.probe_load(self.job.user_id, current_time))) return [(current_time + get_param("network_delay"), self)] else: # Already collected state; returning to front end. return self.front_end.probe_completed(self.job, self.queue_lengths, current_time) ############################################################################### # Practical things needed for the simulation # ############################################################################### class StatsManager(object): """ Keeps track of statistics about job latency, throughput, etc. """ def __init__(self): self.total_enqueued_tasks = 0 # Total enqueued jobs per-user over time, stored as a list of # (time, queue_length) tuples. self.enqueued_tasks = [] for user in range(get_param("num_users")): self.enqueued_tasks.append([]) self.completed_jobs = [] # Count of jobs for which all tasks were placed in an empty queue. self.jobs_with_all_empty_queues = 0 # Number of running tasks for each user (indexed by user id). # Stored as a list of (time, queue_length) tuples for each user. self.running_tasks = [] self.new_running_tasks = [] first = [] for user in range(get_param("num_users")): first.append(0) self.new_running_tasks.append((0, first)) # List of (time, queue_length) tuples describing the total number of # running tasks in the cluster. self.total_running_tasks = [] for user in range(get_param("num_users")): self.running_tasks.append([]) self.logger = logging.getLogger("StatsManager") # Logging for queue lengths. # Length of individual queues, at fixed intervals. self.queue_lengths = [] # Number of empty queues, at fixed intervals. self.empty_queues = [] # Calculate utilization avg_num_tasks = get_param("num_tasks") if get_param("task_distribution") == "bimodal": avg_num_tasks = (200. / 6) + (10 * 5. / 6) tasks_per_milli = (float(get_param('num_fes') * avg_num_tasks) / get_param('job_arrival_delay')) capacity_tasks_per_milli = (float(get_param('num_servers') * get_param("cores_per_server")) / get_param('task_length')) self.utilization = tasks_per_milli / capacity_tasks_per_milli self.logger.info("Utilization: %s" % self.utilization) def record_job_with_all_empty_queues(self): self.jobs_with_all_empty_queues += 1 def record_queue_lengths(self, queue_lengths): num_empty_queues = 0 for length in queue_lengths: if length == 0: num_empty_queues += 1 self.queue_lengths.append(length) self.empty_queues.append(num_empty_queues) def task_queued(self, user_id, current_time): num_queued_tasks = 1 queued_tasks_history = self.enqueued_tasks[user_id] if len(queued_tasks_history) > 0: num_queued_tasks = queued_tasks_history[-1][1] + 1 assert num_queued_tasks >= 1 queued_tasks_history.append((current_time, num_queued_tasks)) self.total_enqueued_tasks += 1 def task_started(self, user_id, current_time): """ Should be called when a task begins running. """ # Infer number of currently running tasks. num_running_tasks = 1 if len(self.running_tasks[user_id]) > 0: num_running_tasks = self.running_tasks[user_id][-1][1] + 1 assert num_running_tasks >= 1 self.running_tasks[user_id].append((current_time, num_running_tasks)) # NEW new_running = list(self.new_running_tasks[-1][1]) new_running[user_id] += 1 assert new_running[user_id] >= 1 self.new_running_tasks.append((current_time, new_running)) total_running_tasks = 1 if len(self.total_running_tasks) > 0: total_running_tasks = self.total_running_tasks[-1][1] + 1 assert total_running_tasks > 0 self.total_running_tasks.append((current_time, total_running_tasks)) def task_finished(self, user_id, current_time): assert len(self.running_tasks[user_id]) > 0 num_running_tasks = self.running_tasks[user_id][-1][1] - 1 assert num_running_tasks >= 0 self.running_tasks[user_id].append((current_time, num_running_tasks)) assert len(self.total_running_tasks) > 0 total_running_tasks = self.total_running_tasks[-1][1] - 1 assert total_running_tasks >= 0 self.total_running_tasks.append((current_time, total_running_tasks)) # NEW assert len(self.new_running_tasks) > 0 old_running = list(self.new_running_tasks[-1][1]) old_running[user_id] -= 1 self.new_running_tasks.append((current_time, old_running)) assert self.total_enqueued_tasks > 0 self.total_enqueued_tasks -= 1 queued_tasks_history = self.enqueued_tasks[user_id] assert len(queued_tasks_history) > 0 num_queued_tasks = queued_tasks_history[-1][1] - 1 assert num_queued_tasks >= 0 queued_tasks_history.append((current_time, num_queued_tasks)) def job_finished(self, job): self.completed_jobs.append(job) def output_stats(self): assert(self.total_enqueued_tasks == 0) results_dirname = get_param('results_dir') try: os.mkdir(results_dirname) except: pass if get_param("record_task_info"): if get_param("load_metric") in ["total", "estimate"]: self.output_wait_time_cdf() else: self.output_load_versus_launch_time() self.output_running_tasks() self.output_bucketed_running_tasks() #self.output_queue_size() # self.output_queue_size_cdf() #self.output_job_overhead() self.output_response_times() self.write_stacked_response_times() if get_param("num_users") > 1: for user_id in range(get_param("num_users")): self.output_response_times(user_id) # This can be problematic for small total runtimes, since the number # of jobs with 200 tasks may be just 1 or 0. if get_param("task_distribution") == "bimodal": self.output_per_job_size_response_time() def output_load_versus_launch_time(self): """ Outputs the predicted load and launch time for each task. This information is intended to help evaluate the staleness of the load information from the probe. If the information is quite stale, we'd expect to see little correlation between the load and the launch time of the task. """ results_dirname = get_param("results_dir") per_task_filename = os.path.join(results_dirname, "%s_task_load_vs_wait" % get_param("file_prefix")) per_task_file = open(per_task_filename, "w") per_task_file.write("load\twait_time\n") per_job_filename = os.path.join(results_dirname, "%s_job_load_vs_wait" % get_param("file_prefix")) per_job_file = open(per_job_filename, "w") per_job_file.write("load\twait_time\n") for job in self.completed_jobs: # Launch time and expected load for the last task to launch. longest_task_wait = -1 longest_task_load = -1 for task_id in range(job.num_tasks): load = job.probe_results[task_id] wait = job.wait_times[task_id] if wait > longest_task_wait: longest_task_wait = wait longest_task_load = load per_task_file.write("%f\t%f\n" % (load, wait)) per_job_file.write("%f\t%f\n" % (longest_task_load, longest_task_wait)) per_job_file.close() per_task_file.close() def output_wait_time_cdf(self): """ Outputs a CDF of wait times for each probe response. This function should only be called if the load metric is total, since otherwise, the probe responses will be non-integral (and there will be potentially a large number of different responses), so the output format used here won't make sense. Outputs two files, one with a CDF for all tasks, and one with a CDF for the longest task in each job. """ results_dirname = get_param("results_dir") job_filename = os.path.join(results_dirname, "%s_job_wait_cdf" % get_param("file_prefix")) job_file = open(job_filename, "w") task_filename = os.path.join(results_dirname, "%s_task_wait_cdf" % get_param("file_prefix")) task_file = open(task_filename, "w") # Dictionary mapping loads (as returned by probes) to a list of wait # times for the corresponding tasks. wait_times_per_load = {} # Wait times for the last task in each job. longest_wait_times_per_load = {} for job in self.completed_jobs: longest_task_wait = -1 longest_task_load = -1 for task_id in range(job.num_tasks): load = job.probe_results[task_id] wait = job.wait_times[task_id] if wait > longest_task_wait: longest_task_wait = wait longest_task_load = load if load not in wait_times_per_load: wait_times_per_load[load] = [] wait_times_per_load[load].append(wait) if longest_task_load not in longest_wait_times_per_load: longest_wait_times_per_load[longest_task_load] = [] longest_wait_times_per_load[longest_task_load].append( longest_task_wait) task_file.write("Percentile\t") job_file.write("Percentile\t") for load in sorted(wait_times_per_load.keys()): wait_times_per_load[load].sort() task_file.write("%f(%d)\t" % (load, len(wait_times_per_load[load]))) task_file.write("\n") for load in sorted(longest_wait_times_per_load.keys()): longest_wait_times_per_load[load].sort() job_file.write("%f(%d)\t" % (load, len(longest_wait_times_per_load[load]))) job_file.write("\n") percentile_granularity = 200 for i in range(percentile_granularity): percentile = float(i) / percentile_granularity job_file.write("%f" % percentile) task_file.write("%f" % percentile) for load in sorted(longest_wait_times_per_load.keys()): job_file.write("\t%f" % self.percentile( longest_wait_times_per_load[load], percentile)) job_file.write("\n") for load in sorted(wait_times_per_load.keys()): task_file.write("\t%f" % self.percentile(wait_times_per_load[load], percentile)) task_file.write("\n") job_file.close() def output_bucketed_running_tasks(self): """ Writes the number of running tasks for each user. The number of running tasks are bucketed over some interval, to give a sense of fairness over time. """ bucketed_running_tasks_per_user = [] bucket_interval = 100 results_dirname = get_param("results_dir") filename = os.path.join(results_dirname, "%s_bucketed_running_tasks" % get_param("file_prefix")) file = open(filename, "w") file.write("time\t") for user_id in range(get_param("num_users")): bucketed_running_tasks = [] # Total number of CPU milliseconds used during this bucket. cpu_millis = 0 current_running_tasks = 0 # Last time we got a measurement for the number of running tasks. previous_time = 0 # Beginning of the current bucket. bucket_start_time = 0 for time, running_tasks in self.running_tasks[user_id]: while time > bucket_start_time + bucket_interval: # Roll over to next bucket. bucket_end_time = bucket_start_time + bucket_interval cpu_millis += (current_running_tasks * (bucket_end_time - previous_time)) bucketed_running_tasks.append(cpu_millis) cpu_millis = 0 previous_time = bucket_end_time bucket_start_time = bucket_end_time cpu_millis += current_running_tasks * (time - previous_time) previous_time = time current_running_tasks = running_tasks bucketed_running_tasks_per_user.append(bucketed_running_tasks) file.write("total\n") # Write bucketed running tasks to file. num_buckets = len(bucketed_running_tasks_per_user[0]) for bucket_index in range(num_buckets): file.write("%d\t" % (bucket_index * bucket_interval)) total_cpu_millis = 0 for user_id in range(get_param("num_users")): running_tasks = bucketed_running_tasks_per_user[user_id] if len(running_tasks) > bucket_index: cpu_millis = running_tasks[bucket_index] else: cpu_millis = 0 total_cpu_millis += cpu_millis file.write("%d\t" % cpu_millis) file.write("%d\n" % total_cpu_millis) def output_running_tasks(self): """ Output the number of tasks running over time. Outputs the number of tasks per user, as well as the number of running tasks overall. """ results_dirname = get_param("results_dir") for user_id in range(get_param("num_users")): filename = os.path.join(results_dirname, "%s_running_tasks_%d" % (get_param("file_prefix"), user_id)) running_tasks_file = open(filename, "w") self.write_running_tasks(running_tasks_file, self.running_tasks[user_id]) running_tasks_file.close() # Output aggregate running tasks. filename = os.path.join(results_dirname, "%s_running_tasks" % get_param("file_prefix")) running_tasks_file = open(filename, "w") self.write_running_tasks(running_tasks_file, self.total_running_tasks) running_tasks_file.close() def write_running_tasks(self, file, tasks_list): """ Writes a list of (time, num_tasks) tuples to file. Consolidates tuples occurring at the same time, and writes the list in reverse order. """ file.write("time\trunning_tasks\n") previous_time = -1 # Write in reverse order so that we automatically get the last event # for each time. for time, running_tasks in reversed(tasks_list): if time != previous_time: if previous_time != -1: file.write("%d\t%d\n" % (previous_time, running_tasks)) file.write("%d\t%d\n" % (time, running_tasks)) previous_time = time def output_queue_size(self): """ Output the queue size over time. """ results_dirname = get_param('results_dir') filename = os.path.join(results_dirname, '%s_%s' % (get_param('file_prefix'), 'queued_tasks')) queued_tasks_file = open(filename, 'w') queued_tasks_file.write('time\ttotal_queued_tasks\n') for time, queued_tasks in self.enqueued_tasks: queued_tasks_file.write('%s\t%s\n' % (time, queued_tasks)) queued_tasks_file.close() def output_queue_size_cdf(self): """ Output the cumulative probabilities of queue sizes. """ results_dirname = get_param("results_dir") filename = os.path.join(results_dirname, "%s_%s" % (get_param("file_prefix"), "queue_cdf")) queue_cdf_file = open(filename, "w") queue_cdf_file.write("%ile\tQueueSize\n") queue_sizes = [] for time, queued_tasks in self.enqueued_tasks: queue_sizes.append(queued_tasks) queue_sizes.sort() stride = max(1, len(queue_sizes) / 200) for index, queue_size in enumerate(queue_sizes[::stride]): percentile = (index + 1) * stride * 1.0 / len(queue_sizes) queue_cdf_file.write("%f\t%f\n" % (percentile, queue_size)) queue_cdf_file.close() def output_job_overhead(self): """ Write job completion time and longest task for every job to a file. """ results_dirname = get_param("results_dir") filename = os.path.join(results_dirname, "%s_%s" % (get_param("file_prefix"), "overhead")) overhead_file = open(filename, "w") overhead_file.write("ResponseTime\tLongestTask\n") for job in self.completed_jobs: overhead_file.write("%d\t%d\n" % (job.response_time(), job.longest_task)) overhead_file.close() def write_stacked_response_times(self): """ Writes a list of (time, num_tasks) tuples to file. Consolidates tuples occurring at the same time, and writes the list in reverse order. """ results_dirname = get_param("results_dir") filename = os.path.join(results_dirname, "%s_%s" % (get_param("file_prefix"), "stacked_fairness")) file = open(filename, "w") file.write("time\trunning_tasks\n") previous_time = -1 # Write in reverse order so that we automatically get the last event # for each time. for time, running_tasks in reversed(self.new_running_tasks): if time != previous_time: if previous_time != -1: file.write("%d\t" % time) for user in range(get_param("num_users")): file.write("%d\t" % running_tasks[user]) file.write("\n") previous_time = time def output_response_times(self, user_id=-1): """ Aggregate response times, and write job info to file. Parameters: user_id: An optional integer specifying the id of the user for whom to output aggregate response time info. If absent, outputs delay summaries for all users. """ results_dirname = get_param('results_dir') user_id_suffix = "" if user_id != -1: user_id_suffix = "_%d" % user_id filename = os.path.join(results_dirname, '%s_%s%s' % (get_param('file_prefix'), 'response_vs_time', user_id_suffix)) response_vs_time_file = open(filename, 'w') response_vs_time_file.write('arrival\tresponse time\n') response_times = [] # Job overhead is defined to the the total time the job took to run, # divided by the runtime of the longest task. In other words, this is # the overhead of running on a shared cluster, compared to if the job # ran by itself on a cluster. job_overhead = 0.0 for job in self.completed_jobs: # Doing it this way, rather than just recording the response times # for all users in one go, is somewhat inefficient. if user_id != -1 and job.user_id != user_id: continue assert(job.wait_time >= -0.00001) response_vs_time_file.write('%s\t%s\n' % (job.arrival_time, job.response_time())) response_times.append(job.response_time()) # Not really fair to count network overhead in the job overhead. normalized_response_time = (job.response_time() - 3 * get_param("network_delay")) job_overhead += normalized_response_time * 1.0 / job.longest_task job_overhead = (job_overhead / len(self.completed_jobs)) - 1 # Append avg + stdev to each results file. n = get_param("num_tasks") probes_ratio = get_param("probes_ratio") filename = os.path.join( results_dirname, "%s_response_time%s" % (get_param('file_prefix'), user_id_suffix)) if get_param('first_time'): f = open(filename, 'w') f.write("n\tProbesRatio\tUtil.\tMeanRespTime\tStdDevRespTime\t" "5Pctl\t50Pctl\t95Pctl\t99PctlRespTime\t" "NetworkDelay\tJobOverhead\tNumServers\tAvg#EmptyQueues\t" "%JobsWithNoQueueing\n") f.close() f = open(filename, 'a') # Currently, only the response time is written to file. avg_empty_queues = -1 if len(self.empty_queues) > 0: avg_empty_queues = stats_mod.lmean(self.empty_queues) response_times.sort() percentage_jobs_no_queueing = (float(self.jobs_with_all_empty_queues) / len(self.completed_jobs)) f.write(("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" "\t%s\t%s\t%s\n") % (n, probes_ratio, self.utilization, stats_mod.lmean(response_times), stats_mod.lstdev(response_times), self.percentile(response_times, 0.05), self.percentile(response_times, 0.5), self.percentile(response_times, 0.95), self.percentile(response_times,.99), get_param("network_delay"), job_overhead, get_param("num_servers"), avg_empty_queues, percentage_jobs_no_queueing)) f.close() # Write CDF of response times. #filename = os.path.join(results_dirname, "%s_response_time_cdf" % # get_param("file_prefix")) #f = open(filename, "w") #stride = max(1, len(response_times) / 200) #for index, response_time in enumerate(response_times[::stride]): # percentile = (index + 1) * stride * 1.0 / len(response_times) # f.write("%f\t%f\n" % (percentile, response_time)) #f.close() def output_per_job_size_response_time(self): """ Output extra, separate files, with response times for each job size. """ results_dirname = get_param('results_dir') num_tasks_to_response_times = {} for job in self.completed_jobs: if job.num_tasks not in num_tasks_to_response_times: num_tasks_to_response_times[job.num_tasks] = [] num_tasks_to_response_times[job.num_tasks].append( job.response_time()) n = get_param("num_tasks") probes_ratio = get_param("probes_ratio") for num_tasks, response_times in num_tasks_to_response_times.items(): filename = os.path.join( results_dirname, "%s_response_time_%s" % (get_param("file_prefix"), num_tasks)) if get_param('first_time'): f = open(filename, 'w') f.write("n\tProbesRatio\tUtil.\tMean\tStdDev\t99Pctl\t" "NetworkDelay\n") f.close() f = open(filename, 'a') f.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % (n, probes_ratio, self.utilization, stats_mod.lmean(response_times), stats_mod.lstdev(response_times), stats_mod.lscoreatpercentile(response_times,.99), get_param("network_delay"))) f.close() def write_float_array(self, file_suffix, arr, sorted=False): filename = os.path.join( get_param('results_dir'), '%s_%s' % (get_param('file_prefix'), file_suffix)) f = open(filename, "w") if sorted: arr.sort() for i in range(len(arr)): f.write("%d %f\n" % (i, arr[i])) f.close() def percentile(self, values, percent): """Finds the percentile of a list of values. Copied from: http://code.activestate.com/recipes/511478-finding-the-percentile-of-the-values/. Arguments: N: List of values. Note N MUST BE already sorted. percent: Float value from 0.0 to 1.0. Returns: Float specifying percentile of the values. """ if not values: return None k = (len(values)-1) * percent f = math.floor(k) c = math.ceil(k) if f == c: return values[int(k)] d0 = values[int(f)] * (c-k) d1 = values[int(c)] * (k-f) return d0+d1 class Simulation(object): """ Attributes: event_queue: A priority queue of events. Events are added to queue as (time, event) tuples. """ def __init__(self, num_front_ends, num_servers, num_users): self.current_time_ms = 0 self.event_queue = Queue.PriorityQueue() self.total_jobs = 0 self.logger = logging.getLogger("Simulation") self.stats_manager = StatsManager() self.num_users = num_users # Initialize servers self.num_servers = num_servers self.servers = [] while len(self.servers) < self.num_servers: self.servers.append(Server(len(self.servers), self.stats_manager, self.num_users)) # Initialize front ends self.num_front_ends = num_front_ends self.front_ends = [] while len(self.front_ends) < self.num_front_ends: if get_param("choices_per_task") > 0: self.front_ends.append(ConstraintFrontEnd(self.servers, len(self.front_ends), self.stats_manager)) else: self.front_ends.append(FrontEnd(self.servers, len(self.front_ends), self.stats_manager)) def create_jobs(self, total_time): """ Creates num_jobs jobs on EACH front end. Parameters: total_time: The maximum time of any possible job created. We try to create jobs filling most of the allocated time. """ task_distribution = get_param('task_distribution') num_tasks = get_param('num_tasks') task_length = get_param('task_length') avg_arrival_delay = get_param('job_arrival_delay') job_arrival_distribution = get_param('job_arrival_distribution') for front_end in self.front_ends: last_job_arrival = 0 count = 0 while True: if job_arrival_distribution == "constant": new_last = last_job_arrival + avg_arrival_delay else: # If the job arrivals are a Poisson process, the time # between jobs follows an exponential distribution. new_last = last_job_arrival + \ random.expovariate(1.0/avg_arrival_delay) # See if we've passed the end of the experiment if new_last > total_time: break else: last_job_arrival = new_last if task_distribution == "bimodal": if random.random() > (1.0 / 6): # 5/6 of the jobs have 10 tasks. num_tasks = 10 else: num_tasks = 200 relative_demands = get_param("relative_demands") if relative_demands == []: user_id = random.randrange(self.num_users) else: r = random.random() user_id = -1 for current_user in range(self.num_users): if r < get_param("relative_demands")[current_user]: user_id = current_user break assert user_id != -1 job = Job(user_id, last_job_arrival, num_tasks, task_length, self.stats_manager, front_end.id_str + ":" + str(count), self.servers) job_arrival_event = JobArrival(job, front_end) self.event_queue.put((last_job_arrival, job_arrival_event)) self.total_jobs += 1 count = count + 1 def run(self): """ Runs the simulation until all jobs have completed. """ counter = 0 counter_increment = 1000 # Reporting frequency last_time = 0 if get_param("record_queue_state"): # Add event to query queue state. query_interval = 1 report_queue_state = RecordQueueState(self.servers, self.stats_manager, query_interval) self.event_queue.put((query_interval, report_queue_state)) while len(self.stats_manager.completed_jobs) < self.total_jobs: assert(not self.event_queue.empty()) current_time, event = self.event_queue.get() #if current_time >= 3.0 * get_param("total_time") / 4.0: # set_param("relative_weights", "1,2") #elif current_time >= 1.0 * get_param("total_time") / 2.0: # set_param("relative_weights", "1,4") assert(current_time >= last_time) last_time = current_time if current_time > counter: counter = counter + counter_increment new_events = event.run(current_time) if new_events: for new_event in new_events: self.event_queue.put(new_event) self.stats_manager.output_stats() output_params() def main(argv): if len(argv) > 0 and "help" in argv[0]: print "Usage: python simulation.py " + "".join( ["[%s=v (%s)] " % (k[0], k[1][1]) for k in PARAMS.items()]) sys.exit(0) # Fill in any specified parameters for arg in argv: kv = arg.split("=") if len(kv) == 2 and kv[0] in PARAMS: set_param(kv[0], kv[1]) elif kv[0] not in PARAMS: logging.warn("Ignoring key %s" % kv[0]) # Sanity check if get_param("probes_ratio") < 1.0 and get_param("probes_ratio") != -1: print ("Given value, %f, is not a valid probes_ratio" % get_param("probes_ratio")) sys.exit(0) relative_demands = get_param("relative_demands") if (relative_demands != [] and \ len(relative_demands) != get_param("num_users")): print ("The length of relative demands does not match the " "given number of users") sys.exit(0) relative_weights = get_param("relative_weights") if (relative_weights != [] and \ len(relative_weights) != get_param("num_users")): print ("The length of relative weights does not match the " "given number of users") sys.exit(0) logging.basicConfig(level=LEVELS.get(get_param('log_level'))) if get_param("deterministic") is True: random.seed(get_param("random_seed")) print get_param("relative_weights") sim = Simulation(get_param("num_fes"), get_param("num_servers"), get_param("num_users")) sim.create_jobs(get_param("total_time")) sim.run() if __name__ == '__main__': main(sys.argv[1:]) ================================================ FILE: simulation/simulation_multi.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # """ Simulation, changed to asked for multiple tasks in getTask() request. """ import logging import math import numpy import random import Queue from util import Job, TaskDistributions MEDIAN_TASK_DURATION = 100 NETWORK_DELAY = 0.5 TASKS_PER_JOB = 100 SLOTS_PER_WORKER = 4 TOTAL_WORKERS = 10000 PROBE_RATIO = 2 def get_percentile(N, percent, key=lambda x:x): if not N: return 0 k = (len(N) - 1) * percent f = math.floor(k) c = math.ceil(k) if f == c: return key(N[int(k)]) d0 = key(N[int(f)]) * (c-k) d1 = key(N[int(c)]) * (k-f) return d0 + d1 def plot_cdf(values, filename): values.sort() f = open(filename, "w") for percent in range(100): fraction = percent / 100. f.write("%s\t%s\n" % (fraction, get_percentile(values, fraction))) f.close() class Event(object): """ Abstract class representing events. """ def __init__(self): raise NotImplementedError("Event is an abstract class and cannot be " "instantiated directly") def run(self, current_time): """ Returns any events that should be added to the queue. """ raise NotImplementedError("The run() method must be implemented by " "each class subclassing Event") class JobArrival(Event): """ Event to signify a job arriving at a scheduler. """ def __init__(self, simulation, interarrival_delay, task_distribution): self.simulation = simulation self.interarrival_delay = interarrival_delay self.task_distribution = task_distribution def run(self, current_time): job = Job(TASKS_PER_JOB, current_time, self.task_distribution, MEDIAN_TASK_DURATION) logging.getLogger("sim").debug("Job %s arrived at %s" % (job.id, current_time)) # Schedule job. new_events = self.simulation.send_probes(job, current_time) # Add new Job Arrival event, for the next job to arrive after this one. arrival_delay = random.expovariate(1.0 / self.interarrival_delay) new_events.append((current_time + arrival_delay, self)) logging.getLogger("sim").debug("Retuning %s events" % len(new_events)) return new_events class ProbeEvent(Event): """ Event to signify a probe arriving at a worker. """ def __init__(self, worker, job_id): self.worker = worker self.job_id = job_id def run(self, current_time): #print ("Probe for job %s arrived at worker %s at %s" % # (self.job_id, self.worker.id, current_time)) return self.worker.add_probe(self.job_id, current_time) class NoopGetTaskResponseEvent(Event): """ Signifies when a getTask() RPC response arrives at a worker, with a noop response. """ def __init__(self, worker, num_tasks): self.worker = worker # The number of tasks requested from the scheduler. self.num_tasks = num_tasks def run(self, current_time): logging.getLogger("sim").debug("getTask() request for worker %s returned no task at %s" % (self.worker.id, current_time)) return self.worker.free_slots(current_time, self.num_tasks) class TaskEndEvent(): def __init__(self, worker): self.worker = worker def run(self, current_time): return self.worker.free_slots(current_time, 1) class Worker(object): def __init__(self, simulation, num_slots, id): self.simulation = simulation self.num_free_slots = num_slots # Just a list of job ids! self.queued_probes = Queue.Queue() self.id = id self.probes_replied_to_immediately = 0 def add_probe(self, job_id, current_time): self.queued_probes.put(job_id) new_events = self.maybe_get_tasks(current_time) self.probes_replied_to_immediately += len(new_events) logging.getLogger("sim").debug("Worker %s: %s" % (self.id, self.probes_replied_to_immediately)) return new_events def free_slots(self, current_time, num_slots): """ Frees a slot on the worker and attempts to launch another task in that slot. """ self.num_free_slots += num_slots get_task_events = self.maybe_get_tasks(current_time) return get_task_events def maybe_get_tasks(self, current_time): events = [] while not self.queued_probes.empty() and self.num_free_slots > 0: # Account for "running" task self.num_free_slots -= 1 job_id = self.queued_probes.get() #if not self.queued_probes.empty(): # assert self.num_free_slots == 0 # Try to get more than one task, if this worker is sitting mostly idle. num_tasks_to_get = 1 if self.num_free_slots > 0 and self.queued_probes.empty(): # TODO: should ignore other queued ones at this point?? # Go to the extreme: try to use all of the free slots. num_tasks_to_get += self.num_free_slots self.num_free_slots = 0 logging.getLogger("sim").debug("Num tasks to get: %s" % num_tasks_to_get) task_durations = self.simulation.get_tasks(job_id, num_tasks_to_get) probe_response_time = current_time + 2*NETWORK_DELAY events = [] for task_duration in task_durations: task_end_time = probe_response_time + task_duration logging.getLogger("sim").debug(("Task for job %s running on worker %s (get task at: %s, duration: %s, " "end: %s)") % (job_id, self.id, current_time, task_duration, task_end_time)) self.simulation.add_task_completion_time(job_id, task_end_time) events.append((task_end_time, TaskEndEvent(self))) if len(events) < num_tasks_to_get: # Need to free some slots unfilled_slots = num_tasks_to_get - len(events) logging.getLogger("sim").debug("Noop returning on worker %s at %s" % (self.id, probe_response_time)) events.append((probe_response_time, NoopGetTaskResponseEvent(self, unfilled_slots))) return events class Simulation(object): def __init__(self, num_jobs, file_prefix, load, task_distribution): avg_used_slots = load * SLOTS_PER_WORKER * TOTAL_WORKERS self.interarrival_delay = (1.0 * MEDIAN_TASK_DURATION * TASKS_PER_JOB / avg_used_slots) print ("Interarrival delay: %s (avg slots in use: %s)" % (self.interarrival_delay, avg_used_slots)) self.jobs = {} self.remaining_jobs = num_jobs self.event_queue = Queue.PriorityQueue() self.workers = [] self.file_prefix = file_prefix while len(self.workers) < TOTAL_WORKERS: self.workers.append(Worker(self, SLOTS_PER_WORKER, len(self.workers))) self.worker_indices = range(TOTAL_WORKERS) self.task_distribution = task_distribution def send_probes(self, job, current_time): """ Send probes to acquire load information, in order to schedule a job. """ self.jobs[job.id] = job random.shuffle(self.worker_indices) probe_events = [] num_probes = PROBE_RATIO * len(job.unscheduled_tasks) for worker_index in self.worker_indices[:num_probes]: probe_events.append((current_time + NETWORK_DELAY, ProbeEvent(self.workers[worker_index], job.id))) return probe_events def get_tasks(self, job_id, num_tasks): job = self.jobs[job_id] remaining_tasks = num_tasks # Durations of tasks to launch. task_durations = [] while len(job.unscheduled_tasks) > 0 and remaining_tasks > 0: task_durations.append(job.unscheduled_tasks[0]) job.unscheduled_tasks = job.unscheduled_tasks[1:] remaining_tasks -= 1 assert len(task_durations) + remaining_tasks == num_tasks return task_durations def add_task_completion_time(self, job_id, completion_time): job_complete = self.jobs[job_id].task_completed(completion_time) if job_complete: self.remaining_jobs -= 1 logging.getLogger("sim").debug("Job %s completed in %s" % (job_id, self.jobs[job_id].end_time - self.jobs[job_id].start_time)) def run(self): half_jobs = self.remaining_jobs / 2 self.event_queue.put((0, JobArrival(self, self.interarrival_delay, self.task_distribution))) last_time = 0 output_worker_loads = False while self.remaining_jobs > 0: # At a point in the middle of the experiment, get the distribution of tasks # on each worker. if not output_worker_loads and self.remaining_jobs == half_jobs: worker_loads = [w.num_free_slots for w in self.workers] plot_cdf(worker_loads, "%s_worker_loads.data" % self.file_prefix) output_worker_loads = True current_time, event = self.event_queue.get() assert current_time >= last_time last_time = current_time new_events = event.run(current_time) for new_event in new_events: self.event_queue.put(new_event) print ("Simulation ended after %s milliseconds (%s jobs started)" % (last_time, len(self.jobs))) complete_jobs = [j for j in self.jobs.values() if j.completed_tasks_count == j.num_tasks] print "%s complete jobs" % len(complete_jobs) response_times = [job.end_time - job.start_time for job in complete_jobs if job.start_time > 0] print "Included %s jobs" % len(response_times) plot_cdf(response_times, "%s_response_times.data" % self.file_prefix) print "Average response time: ", numpy.mean(response_times) longest_tasks = [job.longest_task for job in complete_jobs] plot_cdf(longest_tasks, "%s_ideal_response_time.data" % self.file_prefix) tasks_replied_to_immediately = sum([w.probes_replied_to_immediately for w in self.workers]) print "Tasks replied to immeiately: ", tasks_replied_to_immediately return response_times def main(): random.seed(1) logging.basicConfig(level=logging.INFO) sim = Simulation(1000, "multiget", 0.95, TaskDistributions.CONSTANT) sim.run() if __name__ == "__main__": main() ================================================ FILE: simulation/simulation_random.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # """ Simulations a random assignment of tasks to workers. """ import math import numpy import random import Queue from util import Job, TaskDistributions MEDIAN_TASK_DURATION = 100 NETWORK_DELAY = 0.5 TASKS_PER_JOB = 100 SLOTS_PER_WORKER = 4 TOTAL_WORKERS = 10000 def get_percentile(N, percent, key=lambda x:x): if not N: return 0 k = (len(N) - 1) * percent f = math.floor(k) c = math.ceil(k) if f == c: return key(N[int(k)]) d0 = key(N[int(f)]) * (c-k) d1 = key(N[int(c)]) * (k-f) return d0 + d1 def plot_cdf(values, filename): values.sort() f = open(filename, "w") for percent in range(100): fraction = percent / 100. f.write("%s\t%s\n" % (fraction, get_percentile(values, fraction))) f.close() class Event(object): """ Abstract class representing events. """ def __init__(self): raise NotImplementedError("Event is an abstract class and cannot be " "instantiated directly") def run(self, current_time): """ Returns any events that should be added to the queue. """ raise NotImplementedError("The run() method must be implemented by " "each class subclassing Event") class JobArrival(Event): """ Event to signify a job arriving at a scheduler. """ def __init__(self, simulation, interarrival_delay, task_distribution): self.simulation = simulation self.interarrival_delay = interarrival_delay self.task_distribution = task_distribution def run(self, current_time): job = Job(TASKS_PER_JOB, current_time, self.task_distribution, MEDIAN_TASK_DURATION) #print "Job %s arrived at %s" % (job.id, current_time) # Schedule job. new_events = self.simulation.send_tasks(job, current_time) # Add new Job Arrival event, for the next job to arrive after this one. arrival_delay = random.expovariate(1.0 / self.interarrival_delay) new_events.append((current_time + arrival_delay, self)) #print "Retuning %s events" % len(new_events) return new_events class TaskArrival(Event): """ Event to signify a task arriving at a worker. """ def __init__(self, worker, task_duration, job_id): self.worker = worker self.task_duration = task_duration self.job_id = job_id def run(self, current_time): return self.worker.add_task(current_time, self.task_duration, self.job_id) class TaskEndEvent(): def __init__(self, worker): self.worker = worker def run(self, current_time): return self.worker.free_slot(current_time) class Worker(object): def __init__(self, simulation, num_slots, id): self.simulation = simulation self.free_slots = num_slots # Just a list of (task duration, job id) pairs. self.queued_tasks = Queue.Queue() self.id = id def add_task(self, current_time, task_duration, job_id): #print "Task for job %s arrived at worker %s" % (job_id, self.id) self.queued_tasks.put((task_duration, job_id)) return self.maybe_start_task(current_time) def free_slot(self, current_time): """ Frees a slot on the worker and attempts to launch another task in that slot. """ self.free_slots += 1 get_task_events = self.maybe_start_task(current_time) return get_task_events def maybe_start_task(self, current_time): if not self.queued_tasks.empty() and self.free_slots > 0: # Account for "running" task self.free_slots -= 1 task_duration, job_id = self.queued_tasks.get() #print "Launching task for job %s on worker %s" % (job_id, self.id) task_end_time = current_time + task_duration #print ("Task for job %s on worker %s launched at %s; will complete at %s" % #(job_id, self.id, current_time, task_end_time)) self.simulation.add_task_completion_time(job_id, task_end_time) return [(task_end_time, TaskEndEvent(self))] return [] class Simulation(object): def __init__(self, num_jobs, file_prefix, load, task_distribution): avg_used_slots = load * SLOTS_PER_WORKER * TOTAL_WORKERS self.interarrival_delay = (1.0 * MEDIAN_TASK_DURATION * TASKS_PER_JOB / avg_used_slots) print ("Interarrival delay: %s (avg slots in use: %s)" % (self.interarrival_delay, avg_used_slots)) self.jobs = {} self.remaining_jobs = num_jobs self.event_queue = Queue.PriorityQueue() self.workers = [] self.file_prefix = file_prefix while len(self.workers) < TOTAL_WORKERS: self.workers.append(Worker(self, SLOTS_PER_WORKER, len(self.workers))) self.worker_indices = range(TOTAL_WORKERS) self.task_distribution = task_distribution def send_tasks(self, job, current_time): """ Randomly assigns tasks to machines. """ self.jobs[job.id] = job random.shuffle(self.worker_indices) task_arrival_events = [] for i, worker_index in enumerate(self.worker_indices[:len(job.unscheduled_tasks)]): #print "Assigning task %s to worker %s" % (i, worker_index) task_arrival_events.append( (current_time + NETWORK_DELAY, TaskArrival(self.workers[worker_index], job.unscheduled_tasks[i], job.id))) return task_arrival_events def add_task_completion_time(self, job_id, completion_time): job_complete = self.jobs[job_id].task_completed(completion_time) if job_complete: self.remaining_jobs -= 1 def run(self): self.event_queue.put((0, JobArrival(self, self.interarrival_delay, self.task_distribution))) last_time = 0 while self.remaining_jobs > 0: current_time, event = self.event_queue.get() assert current_time >= last_time last_time = current_time new_events = event.run(current_time) for new_event in new_events: self.event_queue.put(new_event) print ("Simulation ended after %s milliseconds (%s jobs started)" % (last_time, len(self.jobs))) complete_jobs = [j for j in self.jobs.values() if j.completed_tasks_count == j.num_tasks] print "%s complete jobs" % len(complete_jobs) response_times = [job.end_time - job.start_time for job in complete_jobs if job.start_time > 500] print "Included %s jobs" % len(response_times) plot_cdf(response_times, "%s_response_times.data" % self.file_prefix) print "Average response time: ", numpy.mean(response_times) longest_tasks = [job.longest_task for job in complete_jobs] plot_cdf(longest_tasks, "%s_ideal_response_time.data" % self.file_prefix) return response_times def main(): sim = Simulation(10000, "", 0.9, TaskDistributions.CONSTANT) sim.run() if __name__ == "__main__": main() ================================================ FILE: simulation/test_simulation_cancellation.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import unittest import simulation_cancellation import util class TestMultiGetSimulation(unittest.TestCase): def setUp(self): simulation_cancellation.CANCELLATION = True self.simulation = simulation_cancellation.Simulation(5, "", 0.9, util.TaskDistributions.CONSTANT) def test_workers_tracked_correctly(self): job_id = 13 job_start = 10 num_tasks = 2 job = util.Job(num_tasks, job_start, util.TaskDistributions.CONSTANT, 100) self.assertEqual(job.num_tasks, num_tasks) self.assertEqual(len(job.unscheduled_tasks), num_tasks) probe_events = self.simulation.send_probes(job, job_start) self.assertEqual(len(job.probed_workers), 2*num_tasks) # Run the first probe event. time, first_probe = probe_events[0] # All workers are idle, so should get a task end event back. events = first_probe.run(time) self.assertEquals(len(events), 1) self.assertEquals(len(job.probed_workers), 2*num_tasks - 1) time, second_probe = probe_events[1] events = second_probe.run(time) # This time, should get cancellation events back (in addition to task end event). self.assertEquals(len(events), 1 + num_tasks) self.assertEquals(len(job.probed_workers), num_tasks) # Make sure everything works fine if a worker replies to a probe before realizing it was # cancelled. time, third_probe = probe_events[2] events = third_probe.run(time) # Should just get a no-op event back. self.assertEquals(len(events), 1) if __name__ == '__main__': unittest.main() ================================================ FILE: simulation/test_simulation_multi.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import unittest import simulation_multi class TestMultiGetSimulation(unittest.TestCase): def setUp(self): simulation_multi.TOTAL_WORKERS = 10 self.simulation = simulation_multi.Simulation(5, "", 0.9) def test_basic(self): TASKS_PER_JOB = 3 # ADd a job. JOB_ID = 8 JOB_START = 10 job = simulation_multi.Job(TASKS_PER_JOB, JOB_START) self.simulation.jobs[JOB_ID] = job self.assertEqual(job.num_tasks, TASKS_PER_JOB) self.assertEqual(len(job.unscheduled_tasks), TASKS_PER_JOB) # At this point, all workers are idle. worker = self.simulation.workers[0] # Add a probe for job 0 at 10 millis in. events = worker.add_probe(JOB_ID, JOB_START) # Should return 4 events: one task ending event for each slot and one no-op. self.assertEqual(len(events), 4) self.assertEqual(worker.num_free_slots, 0) # Run the nop-op event. events[-1][1].run(JOB_START + 2) self.assertEqual(worker.num_free_slots, 1) JOB_ID_2 = 15 JOB_START_2 = 15 job2 = simulation_multi.Job(TASKS_PER_JOB, JOB_START_2) self.simulation.jobs[JOB_ID_2] = job2 events = worker.add_probe(JOB_ID_2, JOB_START_2) self.assertEqual(worker.num_free_slots, 0) # One job start event self.assertEqual(len(events), 1) # Fake the completion of the first task some time later; # should launch the second one. new_events = events[0][1].run(JOB_START_2 + 5) # Don't keep the job around at this point. self.assertEqual(len(new_events), 0) def test_multiple_slots_released(self): """Ensures that multiple slots are released when a noop comes back.""" JOB_ID = 20 JOB_START= 50 job = simulation_multi.Job(2, JOB_START) self.simulation.jobs[JOB_ID] = job worker = self.simulation.workers[1] self.assertEqual(worker.num_free_slots, 4) events = worker.add_probe(JOB_ID, JOB_START) self.assertEqual(worker.num_free_slots, 0) # The events shoudl include 2 task end events and 1 noop. self.assertEqual(len(events), 3) # Run the noop event. events[-1][1].run(events[-1][0]) self.assertEqual(worker.num_free_slots, 2) if __name__ == '__main__': unittest.main() ================================================ FILE: simulation/util.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import random class TaskDistributions: EXP_TASKS, EXP_JOBS, CONSTANT = range(3) class Job(object): job_count = 0 def __init__(self, num_tasks, start_time, task_distribution, median_task_duration, scheduler=0): self.id = Job.job_count Job.job_count += 1 self.num_tasks = num_tasks self.completed_tasks_count = 0 self.start_time = start_time self.end_time = start_time self.unscheduled_tasks = [] # TODO: This won't be correctly populated when tasks are stolen. self.time_all_tasks_scheduled = 0 self.last_probe_reply_time= 0 # Change this line to change to distribution of task durations. if task_distribution == TaskDistributions.EXP_TASKS: self.exponentially_distributed_tasks(median_task_duration) elif task_distribution == TaskDistributions.EXP_JOBS: self.exponentially_distributed_jobs(median_task_duration) elif task_distribution == TaskDistributions.CONSTANT: self.constant_distributed_tasks(median_task_duration) self.longest_task = max(self.unscheduled_tasks) self.scheduler = scheduler self.probed_workers = set() def add_probe_response(self, worker, current_time): self.probed_workers.remove(worker.id) assert current_time >= self.last_probe_reply_time self.last_probe_reply_time = current_time if len(self.unscheduled_tasks) > 0: assert current_time >= self.time_all_tasks_scheduled self.time_all_tasks_scheduled = current_time def task_completed(self, completion_time): """ Returns true if the job has completed, and false otherwise. """ self.completed_tasks_count += 1 self.end_time = max(completion_time, self.end_time) assert self.completed_tasks_count <= self.num_tasks return self.num_tasks == self.completed_tasks_count def exponentially_distributed_tasks(self, median_task_duration): while len(self.unscheduled_tasks) < self.num_tasks: # Exponentially distributed task durations. self.unscheduled_tasks.append(random.expovariate(1.0 / median_task_duration)) def exponentially_distributed_jobs(self, median_task_duration): # Choose one exponentially-distributed task duration for all tasks in the job. task_duration = random.expovariate(1.0 / median_task_duration) while len(self.unscheduled_tasks) < self.num_tasks: self.unscheduled_tasks.append(task_duration) def constant_distributed_tasks(self, median_task_duration): while len(self.unscheduled_tasks) < self.num_tasks: self.unscheduled_tasks.append(median_task_duration) ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/BackendService.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class BackendService { public interface Iface { public void launchTask(ByteBuffer message, edu.berkeley.sparrow.thrift.TFullTaskId taskId, edu.berkeley.sparrow.thrift.TUserGroupInfo user) throws org.apache.thrift.TException; } public interface AsyncIface { public void launchTask(ByteBuffer message, edu.berkeley.sparrow.thrift.TFullTaskId taskId, edu.berkeley.sparrow.thrift.TUserGroupInfo user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public void launchTask(ByteBuffer message, edu.berkeley.sparrow.thrift.TFullTaskId taskId, edu.berkeley.sparrow.thrift.TUserGroupInfo user) throws org.apache.thrift.TException { send_launchTask(message, taskId, user); recv_launchTask(); } public void send_launchTask(ByteBuffer message, edu.berkeley.sparrow.thrift.TFullTaskId taskId, edu.berkeley.sparrow.thrift.TUserGroupInfo user) throws org.apache.thrift.TException { launchTask_args args = new launchTask_args(); args.setMessage(message); args.setTaskId(taskId); args.setUser(user); sendBase("launchTask", args); } public void recv_launchTask() throws org.apache.thrift.TException { launchTask_result result = new launchTask_result(); receiveBase(result, "launchTask"); return; } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void launchTask(ByteBuffer message, edu.berkeley.sparrow.thrift.TFullTaskId taskId, edu.berkeley.sparrow.thrift.TUserGroupInfo user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); launchTask_call method_call = new launchTask_call(message, taskId, user, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class launchTask_call extends org.apache.thrift.async.TAsyncMethodCall { private ByteBuffer message; private edu.berkeley.sparrow.thrift.TFullTaskId taskId; private edu.berkeley.sparrow.thrift.TUserGroupInfo user; public launchTask_call(ByteBuffer message, edu.berkeley.sparrow.thrift.TFullTaskId taskId, edu.berkeley.sparrow.thrift.TUserGroupInfo user, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.message = message; this.taskId = taskId; this.user = user; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("launchTask", org.apache.thrift.protocol.TMessageType.CALL, 0)); launchTask_args args = new launchTask_args(); args.setMessage(message); args.setTaskId(taskId); args.setUser(user); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_launchTask(); } } } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap>())); } protected Processor(I iface, Map> processMap) { super(iface, getProcessMap(processMap)); } private static Map> getProcessMap(Map> processMap) { processMap.put("launchTask", new launchTask()); return processMap; } private static class launchTask extends org.apache.thrift.ProcessFunction { public launchTask() { super("launchTask"); } protected launchTask_args getEmptyArgsInstance() { return new launchTask_args(); } protected launchTask_result getResult(I iface, launchTask_args args) throws org.apache.thrift.TException { launchTask_result result = new launchTask_result(); iface.launchTask(args.message, args.taskId, args.user); return result; } } } public static class launchTask_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("launchTask_args"); 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); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new launchTask_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new launchTask_argsTupleSchemeFactory()); } public ByteBuffer message; // required public edu.berkeley.sparrow.thrift.TFullTaskId taskId; // required public edu.berkeley.sparrow.thrift.TUserGroupInfo user; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { MESSAGE((short)1, "message"), TASK_ID((short)2, "taskId"), USER((short)3, "user"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // MESSAGE return MESSAGE; case 2: // TASK_ID return TASK_ID; case 3: // USER return USER; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TFullTaskId.class))); tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TUserGroupInfo.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(launchTask_args.class, metaDataMap); } public launchTask_args() { } public launchTask_args( ByteBuffer message, edu.berkeley.sparrow.thrift.TFullTaskId taskId, edu.berkeley.sparrow.thrift.TUserGroupInfo user) { this(); this.message = message; this.taskId = taskId; this.user = user; } /** * Performs a deep copy on other. */ public launchTask_args(launchTask_args other) { if (other.isSetMessage()) { this.message = org.apache.thrift.TBaseHelper.copyBinary(other.message); ; } if (other.isSetTaskId()) { this.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(other.taskId); } if (other.isSetUser()) { this.user = new edu.berkeley.sparrow.thrift.TUserGroupInfo(other.user); } } public launchTask_args deepCopy() { return new launchTask_args(this); } public void clear() { this.message = null; this.taskId = null; this.user = null; } public byte[] getMessage() { setMessage(org.apache.thrift.TBaseHelper.rightSize(message)); return message == null ? null : message.array(); } public ByteBuffer bufferForMessage() { return message; } public launchTask_args setMessage(byte[] message) { setMessage(message == null ? (ByteBuffer)null : ByteBuffer.wrap(message)); return this; } public launchTask_args setMessage(ByteBuffer message) { this.message = message; return this; } public void unsetMessage() { this.message = null; } /** Returns true if field message is set (has been assigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } public void setMessageIsSet(boolean value) { if (!value) { this.message = null; } } public edu.berkeley.sparrow.thrift.TFullTaskId getTaskId() { return this.taskId; } public launchTask_args setTaskId(edu.berkeley.sparrow.thrift.TFullTaskId taskId) { this.taskId = taskId; return this; } public void unsetTaskId() { this.taskId = null; } /** Returns true if field taskId is set (has been assigned a value) and false otherwise */ public boolean isSetTaskId() { return this.taskId != null; } public void setTaskIdIsSet(boolean value) { if (!value) { this.taskId = null; } } public edu.berkeley.sparrow.thrift.TUserGroupInfo getUser() { return this.user; } public launchTask_args setUser(edu.berkeley.sparrow.thrift.TUserGroupInfo user) { this.user = user; return this; } public void unsetUser() { this.user = null; } /** Returns true if field user is set (has been assigned a value) and false otherwise */ public boolean isSetUser() { return this.user != null; } public void setUserIsSet(boolean value) { if (!value) { this.user = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case MESSAGE: if (value == null) { unsetMessage(); } else { setMessage((ByteBuffer)value); } break; case TASK_ID: if (value == null) { unsetTaskId(); } else { setTaskId((edu.berkeley.sparrow.thrift.TFullTaskId)value); } break; case USER: if (value == null) { unsetUser(); } else { setUser((edu.berkeley.sparrow.thrift.TUserGroupInfo)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case MESSAGE: return getMessage(); case TASK_ID: return getTaskId(); case USER: return getUser(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case MESSAGE: return isSetMessage(); case TASK_ID: return isSetTaskId(); case USER: return isSetUser(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof launchTask_args) return this.equals((launchTask_args)that); return false; } public boolean equals(launchTask_args that) { if (that == null) return false; boolean this_present_message = true && this.isSetMessage(); boolean that_present_message = true && that.isSetMessage(); if (this_present_message || that_present_message) { if (!(this_present_message && that_present_message)) return false; if (!this.message.equals(that.message)) return false; } boolean this_present_taskId = true && this.isSetTaskId(); boolean that_present_taskId = true && that.isSetTaskId(); if (this_present_taskId || that_present_taskId) { if (!(this_present_taskId && that_present_taskId)) return false; if (!this.taskId.equals(that.taskId)) return false; } boolean this_present_user = true && this.isSetUser(); boolean that_present_user = true && that.isSetUser(); if (this_present_user || that_present_user) { if (!(this_present_user && that_present_user)) return false; if (!this.user.equals(that.user)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(launchTask_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; launchTask_args typedOther = (launchTask_args)other; lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetMessage()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId()); if (lastComparison != 0) { return lastComparison; } if (isSetTaskId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, typedOther.taskId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser()); if (lastComparison != 0) { return lastComparison; } if (isSetUser()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, typedOther.user); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("launchTask_args("); boolean first = true; sb.append("message:"); if (this.message == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.message, sb); } first = false; if (!first) sb.append(", "); sb.append("taskId:"); if (this.taskId == null) { sb.append("null"); } else { sb.append(this.taskId); } first = false; if (!first) sb.append(", "); sb.append("user:"); if (this.user == null) { sb.append("null"); } else { sb.append(this.user); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class launchTask_argsStandardSchemeFactory implements SchemeFactory { public launchTask_argsStandardScheme getScheme() { return new launchTask_argsStandardScheme(); } } private static class launchTask_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, launchTask_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // MESSAGE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.message = iprot.readBinary(); struct.setMessageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TASK_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(); struct.taskId.read(iprot); struct.setTaskIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // USER if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.user = new edu.berkeley.sparrow.thrift.TUserGroupInfo(); struct.user.read(iprot); struct.setUserIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, launchTask_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.message != null) { oprot.writeFieldBegin(MESSAGE_FIELD_DESC); oprot.writeBinary(struct.message); oprot.writeFieldEnd(); } if (struct.taskId != null) { oprot.writeFieldBegin(TASK_ID_FIELD_DESC); struct.taskId.write(oprot); oprot.writeFieldEnd(); } if (struct.user != null) { oprot.writeFieldBegin(USER_FIELD_DESC); struct.user.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class launchTask_argsTupleSchemeFactory implements SchemeFactory { public launchTask_argsTupleScheme getScheme() { return new launchTask_argsTupleScheme(); } } private static class launchTask_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, launchTask_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetMessage()) { optionals.set(0); } if (struct.isSetTaskId()) { optionals.set(1); } if (struct.isSetUser()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetMessage()) { oprot.writeBinary(struct.message); } if (struct.isSetTaskId()) { struct.taskId.write(oprot); } if (struct.isSetUser()) { struct.user.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, launchTask_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.message = iprot.readBinary(); struct.setMessageIsSet(true); } if (incoming.get(1)) { struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(); struct.taskId.read(iprot); struct.setTaskIdIsSet(true); } if (incoming.get(2)) { struct.user = new edu.berkeley.sparrow.thrift.TUserGroupInfo(); struct.user.read(iprot); struct.setUserIsSet(true); } } } } public static class launchTask_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("launchTask_result"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new launchTask_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new launchTask_resultTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(launchTask_result.class, metaDataMap); } public launchTask_result() { } /** * Performs a deep copy on other. */ public launchTask_result(launchTask_result other) { } public launchTask_result deepCopy() { return new launchTask_result(this); } public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof launchTask_result) return this.equals((launchTask_result)that); return false; } public boolean equals(launchTask_result that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(launchTask_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; launchTask_result typedOther = (launchTask_result)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("launchTask_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class launchTask_resultStandardSchemeFactory implements SchemeFactory { public launchTask_resultStandardScheme getScheme() { return new launchTask_resultStandardScheme(); } } private static class launchTask_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, launchTask_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, launchTask_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class launchTask_resultTupleSchemeFactory implements SchemeFactory { public launchTask_resultTupleScheme getScheme() { return new launchTask_resultTupleScheme(); } } private static class launchTask_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, launchTask_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, launchTask_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/FrontendService.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class FrontendService { public interface Iface { public void frontendMessage(edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException; } public interface AsyncIface { public void frontendMessage(edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public void frontendMessage(edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException { send_frontendMessage(taskId, status, message); recv_frontendMessage(); } public void send_frontendMessage(edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException { frontendMessage_args args = new frontendMessage_args(); args.setTaskId(taskId); args.setStatus(status); args.setMessage(message); sendBase("frontendMessage", args); } public void recv_frontendMessage() throws org.apache.thrift.TException { frontendMessage_result result = new frontendMessage_result(); receiveBase(result, "frontendMessage"); return; } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void frontendMessage(edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); frontendMessage_call method_call = new frontendMessage_call(taskId, status, message, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class frontendMessage_call extends org.apache.thrift.async.TAsyncMethodCall { private edu.berkeley.sparrow.thrift.TFullTaskId taskId; private int status; private ByteBuffer message; public frontendMessage_call(edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.taskId = taskId; this.status = status; this.message = message; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("frontendMessage", org.apache.thrift.protocol.TMessageType.CALL, 0)); frontendMessage_args args = new frontendMessage_args(); args.setTaskId(taskId); args.setStatus(status); args.setMessage(message); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_frontendMessage(); } } } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap>())); } protected Processor(I iface, Map> processMap) { super(iface, getProcessMap(processMap)); } private static Map> getProcessMap(Map> processMap) { processMap.put("frontendMessage", new frontendMessage()); return processMap; } private static class frontendMessage extends org.apache.thrift.ProcessFunction { public frontendMessage() { super("frontendMessage"); } protected frontendMessage_args getEmptyArgsInstance() { return new frontendMessage_args(); } protected frontendMessage_result getResult(I iface, frontendMessage_args args) throws org.apache.thrift.TException { frontendMessage_result result = new frontendMessage_result(); iface.frontendMessage(args.taskId, args.status, args.message); return result; } } } public static class frontendMessage_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("frontendMessage_args"); 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); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new frontendMessage_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new frontendMessage_argsTupleSchemeFactory()); } public edu.berkeley.sparrow.thrift.TFullTaskId taskId; // required public int status; // required public ByteBuffer message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TASK_ID((short)1, "taskId"), STATUS((short)2, "status"), MESSAGE((short)3, "message"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TASK_ID return TASK_ID; case 2: // STATUS return STATUS; case 3: // MESSAGE return MESSAGE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __STATUS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TFullTaskId.class))); tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(frontendMessage_args.class, metaDataMap); } public frontendMessage_args() { } public frontendMessage_args( edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) { this(); this.taskId = taskId; this.status = status; setStatusIsSet(true); this.message = message; } /** * Performs a deep copy on other. */ public frontendMessage_args(frontendMessage_args other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetTaskId()) { this.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(other.taskId); } this.status = other.status; if (other.isSetMessage()) { this.message = org.apache.thrift.TBaseHelper.copyBinary(other.message); ; } } public frontendMessage_args deepCopy() { return new frontendMessage_args(this); } public void clear() { this.taskId = null; setStatusIsSet(false); this.status = 0; this.message = null; } public edu.berkeley.sparrow.thrift.TFullTaskId getTaskId() { return this.taskId; } public frontendMessage_args setTaskId(edu.berkeley.sparrow.thrift.TFullTaskId taskId) { this.taskId = taskId; return this; } public void unsetTaskId() { this.taskId = null; } /** Returns true if field taskId is set (has been assigned a value) and false otherwise */ public boolean isSetTaskId() { return this.taskId != null; } public void setTaskIdIsSet(boolean value) { if (!value) { this.taskId = null; } } public int getStatus() { return this.status; } public frontendMessage_args setStatus(int status) { this.status = status; setStatusIsSet(true); return this; } public void unsetStatus() { __isset_bit_vector.clear(__STATUS_ISSET_ID); } /** Returns true if field status is set (has been assigned a value) and false otherwise */ public boolean isSetStatus() { return __isset_bit_vector.get(__STATUS_ISSET_ID); } public void setStatusIsSet(boolean value) { __isset_bit_vector.set(__STATUS_ISSET_ID, value); } public byte[] getMessage() { setMessage(org.apache.thrift.TBaseHelper.rightSize(message)); return message == null ? null : message.array(); } public ByteBuffer bufferForMessage() { return message; } public frontendMessage_args setMessage(byte[] message) { setMessage(message == null ? (ByteBuffer)null : ByteBuffer.wrap(message)); return this; } public frontendMessage_args setMessage(ByteBuffer message) { this.message = message; return this; } public void unsetMessage() { this.message = null; } /** Returns true if field message is set (has been assigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } public void setMessageIsSet(boolean value) { if (!value) { this.message = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TASK_ID: if (value == null) { unsetTaskId(); } else { setTaskId((edu.berkeley.sparrow.thrift.TFullTaskId)value); } break; case STATUS: if (value == null) { unsetStatus(); } else { setStatus((Integer)value); } break; case MESSAGE: if (value == null) { unsetMessage(); } else { setMessage((ByteBuffer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TASK_ID: return getTaskId(); case STATUS: return Integer.valueOf(getStatus()); case MESSAGE: return getMessage(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TASK_ID: return isSetTaskId(); case STATUS: return isSetStatus(); case MESSAGE: return isSetMessage(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof frontendMessage_args) return this.equals((frontendMessage_args)that); return false; } public boolean equals(frontendMessage_args that) { if (that == null) return false; boolean this_present_taskId = true && this.isSetTaskId(); boolean that_present_taskId = true && that.isSetTaskId(); if (this_present_taskId || that_present_taskId) { if (!(this_present_taskId && that_present_taskId)) return false; if (!this.taskId.equals(that.taskId)) return false; } boolean this_present_status = true; boolean that_present_status = true; if (this_present_status || that_present_status) { if (!(this_present_status && that_present_status)) return false; if (this.status != that.status) return false; } boolean this_present_message = true && this.isSetMessage(); boolean that_present_message = true && that.isSetMessage(); if (this_present_message || that_present_message) { if (!(this_present_message && that_present_message)) return false; if (!this.message.equals(that.message)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(frontendMessage_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; frontendMessage_args typedOther = (frontendMessage_args)other; lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId()); if (lastComparison != 0) { return lastComparison; } if (isSetTaskId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, typedOther.taskId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetMessage()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("frontendMessage_args("); boolean first = true; sb.append("taskId:"); if (this.taskId == null) { sb.append("null"); } else { sb.append(this.taskId); } first = false; if (!first) sb.append(", "); sb.append("status:"); sb.append(this.status); first = false; if (!first) sb.append(", "); sb.append("message:"); if (this.message == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.message, sb); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class frontendMessage_argsStandardSchemeFactory implements SchemeFactory { public frontendMessage_argsStandardScheme getScheme() { return new frontendMessage_argsStandardScheme(); } } private static class frontendMessage_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, frontendMessage_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TASK_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(); struct.taskId.read(iprot); struct.setTaskIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // STATUS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.status = iprot.readI32(); struct.setStatusIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // MESSAGE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.message = iprot.readBinary(); struct.setMessageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, frontendMessage_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.taskId != null) { oprot.writeFieldBegin(TASK_ID_FIELD_DESC); struct.taskId.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(STATUS_FIELD_DESC); oprot.writeI32(struct.status); oprot.writeFieldEnd(); if (struct.message != null) { oprot.writeFieldBegin(MESSAGE_FIELD_DESC); oprot.writeBinary(struct.message); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class frontendMessage_argsTupleSchemeFactory implements SchemeFactory { public frontendMessage_argsTupleScheme getScheme() { return new frontendMessage_argsTupleScheme(); } } private static class frontendMessage_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, frontendMessage_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetTaskId()) { optionals.set(0); } if (struct.isSetStatus()) { optionals.set(1); } if (struct.isSetMessage()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetTaskId()) { struct.taskId.write(oprot); } if (struct.isSetStatus()) { oprot.writeI32(struct.status); } if (struct.isSetMessage()) { oprot.writeBinary(struct.message); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, frontendMessage_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(); struct.taskId.read(iprot); struct.setTaskIdIsSet(true); } if (incoming.get(1)) { struct.status = iprot.readI32(); struct.setStatusIsSet(true); } if (incoming.get(2)) { struct.message = iprot.readBinary(); struct.setMessageIsSet(true); } } } } public static class frontendMessage_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("frontendMessage_result"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new frontendMessage_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new frontendMessage_resultTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(frontendMessage_result.class, metaDataMap); } public frontendMessage_result() { } /** * Performs a deep copy on other. */ public frontendMessage_result(frontendMessage_result other) { } public frontendMessage_result deepCopy() { return new frontendMessage_result(this); } public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof frontendMessage_result) return this.equals((frontendMessage_result)that); return false; } public boolean equals(frontendMessage_result that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(frontendMessage_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; frontendMessage_result typedOther = (frontendMessage_result)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("frontendMessage_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class frontendMessage_resultStandardSchemeFactory implements SchemeFactory { public frontendMessage_resultStandardScheme getScheme() { return new frontendMessage_resultStandardScheme(); } } private static class frontendMessage_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, frontendMessage_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, frontendMessage_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class frontendMessage_resultTupleSchemeFactory implements SchemeFactory { public frontendMessage_resultTupleScheme getScheme() { return new frontendMessage_resultTupleScheme(); } } private static class frontendMessage_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, frontendMessage_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, frontendMessage_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/GetTaskService.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class GetTaskService { public interface Iface { public List getTask(String requestId, edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress) throws org.apache.thrift.TException; } public interface AsyncIface { public void getTask(String requestId, edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public List getTask(String requestId, edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress) throws org.apache.thrift.TException { send_getTask(requestId, nodeMonitorAddress); return recv_getTask(); } public void send_getTask(String requestId, edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress) throws org.apache.thrift.TException { getTask_args args = new getTask_args(); args.setRequestId(requestId); args.setNodeMonitorAddress(nodeMonitorAddress); sendBase("getTask", args); } public List recv_getTask() throws org.apache.thrift.TException { getTask_result result = new getTask_result(); receiveBase(result, "getTask"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTask failed: unknown result"); } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void getTask(String requestId, edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getTask_call method_call = new getTask_call(requestId, nodeMonitorAddress, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getTask_call extends org.apache.thrift.async.TAsyncMethodCall { private String requestId; private edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress; public getTask_call(String requestId, edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.requestId = requestId; this.nodeMonitorAddress = nodeMonitorAddress; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTask", org.apache.thrift.protocol.TMessageType.CALL, 0)); getTask_args args = new getTask_args(); args.setRequestId(requestId); args.setNodeMonitorAddress(nodeMonitorAddress); args.write(prot); prot.writeMessageEnd(); } public List getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getTask(); } } } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap>())); } protected Processor(I iface, Map> processMap) { super(iface, getProcessMap(processMap)); } private static Map> getProcessMap(Map> processMap) { processMap.put("getTask", new getTask()); return processMap; } private static class getTask extends org.apache.thrift.ProcessFunction { public getTask() { super("getTask"); } protected getTask_args getEmptyArgsInstance() { return new getTask_args(); } protected getTask_result getResult(I iface, getTask_args args) throws org.apache.thrift.TException { getTask_result result = new getTask_result(); result.success = iface.getTask(args.requestId, args.nodeMonitorAddress); return result; } } } public static class getTask_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTask_args"); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getTask_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getTask_argsTupleSchemeFactory()); } public String requestId; // required public edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { REQUEST_ID((short)1, "requestId"), NODE_MONITOR_ADDRESS((short)2, "nodeMonitorAddress"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // REQUEST_ID return REQUEST_ID; case 2: // NODE_MONITOR_ADDRESS return NODE_MONITOR_ADDRESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.REQUEST_ID, new org.apache.thrift.meta_data.FieldMetaData("requestId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NODE_MONITOR_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("nodeMonitorAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.THostPort.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTask_args.class, metaDataMap); } public getTask_args() { } public getTask_args( String requestId, edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress) { this(); this.requestId = requestId; this.nodeMonitorAddress = nodeMonitorAddress; } /** * Performs a deep copy on other. */ public getTask_args(getTask_args other) { if (other.isSetRequestId()) { this.requestId = other.requestId; } if (other.isSetNodeMonitorAddress()) { this.nodeMonitorAddress = new edu.berkeley.sparrow.thrift.THostPort(other.nodeMonitorAddress); } } public getTask_args deepCopy() { return new getTask_args(this); } public void clear() { this.requestId = null; this.nodeMonitorAddress = null; } public String getRequestId() { return this.requestId; } public getTask_args setRequestId(String requestId) { this.requestId = requestId; return this; } public void unsetRequestId() { this.requestId = null; } /** Returns true if field requestId is set (has been assigned a value) and false otherwise */ public boolean isSetRequestId() { return this.requestId != null; } public void setRequestIdIsSet(boolean value) { if (!value) { this.requestId = null; } } public edu.berkeley.sparrow.thrift.THostPort getNodeMonitorAddress() { return this.nodeMonitorAddress; } public getTask_args setNodeMonitorAddress(edu.berkeley.sparrow.thrift.THostPort nodeMonitorAddress) { this.nodeMonitorAddress = nodeMonitorAddress; return this; } public void unsetNodeMonitorAddress() { this.nodeMonitorAddress = null; } /** Returns true if field nodeMonitorAddress is set (has been assigned a value) and false otherwise */ public boolean isSetNodeMonitorAddress() { return this.nodeMonitorAddress != null; } public void setNodeMonitorAddressIsSet(boolean value) { if (!value) { this.nodeMonitorAddress = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQUEST_ID: if (value == null) { unsetRequestId(); } else { setRequestId((String)value); } break; case NODE_MONITOR_ADDRESS: if (value == null) { unsetNodeMonitorAddress(); } else { setNodeMonitorAddress((edu.berkeley.sparrow.thrift.THostPort)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQUEST_ID: return getRequestId(); case NODE_MONITOR_ADDRESS: return getNodeMonitorAddress(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case REQUEST_ID: return isSetRequestId(); case NODE_MONITOR_ADDRESS: return isSetNodeMonitorAddress(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getTask_args) return this.equals((getTask_args)that); return false; } public boolean equals(getTask_args that) { if (that == null) return false; boolean this_present_requestId = true && this.isSetRequestId(); boolean that_present_requestId = true && that.isSetRequestId(); if (this_present_requestId || that_present_requestId) { if (!(this_present_requestId && that_present_requestId)) return false; if (!this.requestId.equals(that.requestId)) return false; } boolean this_present_nodeMonitorAddress = true && this.isSetNodeMonitorAddress(); boolean that_present_nodeMonitorAddress = true && that.isSetNodeMonitorAddress(); if (this_present_nodeMonitorAddress || that_present_nodeMonitorAddress) { if (!(this_present_nodeMonitorAddress && that_present_nodeMonitorAddress)) return false; if (!this.nodeMonitorAddress.equals(that.nodeMonitorAddress)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(getTask_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; getTask_args typedOther = (getTask_args)other; lastComparison = Boolean.valueOf(isSetRequestId()).compareTo(typedOther.isSetRequestId()); if (lastComparison != 0) { return lastComparison; } if (isSetRequestId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestId, typedOther.requestId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNodeMonitorAddress()).compareTo(typedOther.isSetNodeMonitorAddress()); if (lastComparison != 0) { return lastComparison; } if (isSetNodeMonitorAddress()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeMonitorAddress, typedOther.nodeMonitorAddress); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("getTask_args("); boolean first = true; sb.append("requestId:"); if (this.requestId == null) { sb.append("null"); } else { sb.append(this.requestId); } first = false; if (!first) sb.append(", "); sb.append("nodeMonitorAddress:"); if (this.nodeMonitorAddress == null) { sb.append("null"); } else { sb.append(this.nodeMonitorAddress); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class getTask_argsStandardSchemeFactory implements SchemeFactory { public getTask_argsStandardScheme getScheme() { return new getTask_argsStandardScheme(); } } private static class getTask_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, getTask_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQUEST_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.requestId = iprot.readString(); struct.setRequestIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NODE_MONITOR_ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.nodeMonitorAddress = new edu.berkeley.sparrow.thrift.THostPort(); struct.nodeMonitorAddress.read(iprot); struct.setNodeMonitorAddressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getTask_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.requestId != null) { oprot.writeFieldBegin(REQUEST_ID_FIELD_DESC); oprot.writeString(struct.requestId); oprot.writeFieldEnd(); } if (struct.nodeMonitorAddress != null) { oprot.writeFieldBegin(NODE_MONITOR_ADDRESS_FIELD_DESC); struct.nodeMonitorAddress.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getTask_argsTupleSchemeFactory implements SchemeFactory { public getTask_argsTupleScheme getScheme() { return new getTask_argsTupleScheme(); } } private static class getTask_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getTask_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRequestId()) { optionals.set(0); } if (struct.isSetNodeMonitorAddress()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetRequestId()) { oprot.writeString(struct.requestId); } if (struct.isSetNodeMonitorAddress()) { struct.nodeMonitorAddress.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getTask_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.requestId = iprot.readString(); struct.setRequestIdIsSet(true); } if (incoming.get(1)) { struct.nodeMonitorAddress = new edu.berkeley.sparrow.thrift.THostPort(); struct.nodeMonitorAddress.read(iprot); struct.setNodeMonitorAddressIsSet(true); } } } } public static class getTask_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTask_result"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getTask_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getTask_resultTupleSchemeFactory()); } public List success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TTaskLaunchSpec.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTask_result.class, metaDataMap); } public getTask_result() { } public getTask_result( List success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public getTask_result(getTask_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (edu.berkeley.sparrow.thrift.TTaskLaunchSpec other_element : other.success) { __this__success.add(new edu.berkeley.sparrow.thrift.TTaskLaunchSpec(other_element)); } this.success = __this__success; } } public getTask_result deepCopy() { return new getTask_result(this); } public void clear() { this.success = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(edu.berkeley.sparrow.thrift.TTaskLaunchSpec elem) { if (this.success == null) { this.success = new ArrayList(); } this.success.add(elem); } public List getSuccess() { return this.success; } public getTask_result setSuccess(List success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getTask_result) return this.equals((getTask_result)that); return false; } public boolean equals(getTask_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(getTask_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; getTask_result typedOther = (getTask_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("getTask_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class getTask_resultStandardSchemeFactory implements SchemeFactory { public getTask_resultStandardScheme getScheme() { return new getTask_resultStandardScheme(); } } private static class getTask_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, getTask_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); struct.success = new ArrayList(_list0.size); for (int _i1 = 0; _i1 < _list0.size; ++_i1) { edu.berkeley.sparrow.thrift.TTaskLaunchSpec _elem2; // required _elem2 = new edu.berkeley.sparrow.thrift.TTaskLaunchSpec(); _elem2.read(iprot); struct.success.add(_elem2); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getTask_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (edu.berkeley.sparrow.thrift.TTaskLaunchSpec _iter3 : struct.success) { _iter3.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getTask_resultTupleSchemeFactory implements SchemeFactory { public getTask_resultTupleScheme getScheme() { return new getTask_resultTupleScheme(); } } private static class getTask_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getTask_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (edu.berkeley.sparrow.thrift.TTaskLaunchSpec _iter4 : struct.success) { _iter4.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getTask_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList(_list5.size); for (int _i6 = 0; _i6 < _list5.size; ++_i6) { edu.berkeley.sparrow.thrift.TTaskLaunchSpec _elem7; // required _elem7 = new edu.berkeley.sparrow.thrift.TTaskLaunchSpec(); _elem7.read(iprot); struct.success.add(_elem7); } } struct.setSuccessIsSet(true); } } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/IncompleteRequestException.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class IncompleteRequestException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IncompleteRequestException"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new IncompleteRequestExceptionStandardSchemeFactory()); schemes.put(TupleScheme.class, new IncompleteRequestExceptionTupleSchemeFactory()); } public String message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { MESSAGE((short)1, "message"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // MESSAGE return MESSAGE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(IncompleteRequestException.class, metaDataMap); } public IncompleteRequestException() { } public IncompleteRequestException( String message) { this(); this.message = message; } /** * Performs a deep copy on other. */ public IncompleteRequestException(IncompleteRequestException other) { if (other.isSetMessage()) { this.message = other.message; } } public IncompleteRequestException deepCopy() { return new IncompleteRequestException(this); } public void clear() { this.message = null; } public String getMessage() { return this.message; } public IncompleteRequestException setMessage(String message) { this.message = message; return this; } public void unsetMessage() { this.message = null; } /** Returns true if field message is set (has been assigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } public void setMessageIsSet(boolean value) { if (!value) { this.message = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case MESSAGE: if (value == null) { unsetMessage(); } else { setMessage((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case MESSAGE: return getMessage(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case MESSAGE: return isSetMessage(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof IncompleteRequestException) return this.equals((IncompleteRequestException)that); return false; } public boolean equals(IncompleteRequestException that) { if (that == null) return false; boolean this_present_message = true && this.isSetMessage(); boolean that_present_message = true && that.isSetMessage(); if (this_present_message || that_present_message) { if (!(this_present_message && that_present_message)) return false; if (!this.message.equals(that.message)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(IncompleteRequestException other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; IncompleteRequestException typedOther = (IncompleteRequestException)other; lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetMessage()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("IncompleteRequestException("); boolean first = true; sb.append("message:"); if (this.message == null) { sb.append("null"); } else { sb.append(this.message); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class IncompleteRequestExceptionStandardSchemeFactory implements SchemeFactory { public IncompleteRequestExceptionStandardScheme getScheme() { return new IncompleteRequestExceptionStandardScheme(); } } private static class IncompleteRequestExceptionStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, IncompleteRequestException struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // MESSAGE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.message = iprot.readString(); struct.setMessageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, IncompleteRequestException struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.message != null) { oprot.writeFieldBegin(MESSAGE_FIELD_DESC); oprot.writeString(struct.message); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class IncompleteRequestExceptionTupleSchemeFactory implements SchemeFactory { public IncompleteRequestExceptionTupleScheme getScheme() { return new IncompleteRequestExceptionTupleScheme(); } } private static class IncompleteRequestExceptionTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, IncompleteRequestException struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetMessage()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetMessage()) { oprot.writeString(struct.message); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, IncompleteRequestException struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.message = iprot.readString(); struct.setMessageIsSet(true); } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/InternalService.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class InternalService { public interface Iface { public boolean enqueueTaskReservations(edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request) throws org.apache.thrift.TException; public void cancelTaskReservations(edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request) throws org.apache.thrift.TException; } public interface AsyncIface { public void enqueueTaskReservations(edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void cancelTaskReservations(edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public boolean enqueueTaskReservations(edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request) throws org.apache.thrift.TException { send_enqueueTaskReservations(request); return recv_enqueueTaskReservations(); } public void send_enqueueTaskReservations(edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request) throws org.apache.thrift.TException { enqueueTaskReservations_args args = new enqueueTaskReservations_args(); args.setRequest(request); sendBase("enqueueTaskReservations", args); } public boolean recv_enqueueTaskReservations() throws org.apache.thrift.TException { enqueueTaskReservations_result result = new enqueueTaskReservations_result(); receiveBase(result, "enqueueTaskReservations"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "enqueueTaskReservations failed: unknown result"); } public void cancelTaskReservations(edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request) throws org.apache.thrift.TException { send_cancelTaskReservations(request); recv_cancelTaskReservations(); } public void send_cancelTaskReservations(edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request) throws org.apache.thrift.TException { cancelTaskReservations_args args = new cancelTaskReservations_args(); args.setRequest(request); sendBase("cancelTaskReservations", args); } public void recv_cancelTaskReservations() throws org.apache.thrift.TException { cancelTaskReservations_result result = new cancelTaskReservations_result(); receiveBase(result, "cancelTaskReservations"); return; } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void enqueueTaskReservations(edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); enqueueTaskReservations_call method_call = new enqueueTaskReservations_call(request, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class enqueueTaskReservations_call extends org.apache.thrift.async.TAsyncMethodCall { private edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request; public enqueueTaskReservations_call(edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.request = request; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("enqueueTaskReservations", org.apache.thrift.protocol.TMessageType.CALL, 0)); enqueueTaskReservations_args args = new enqueueTaskReservations_args(); args.setRequest(request); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_enqueueTaskReservations(); } } public void cancelTaskReservations(edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); cancelTaskReservations_call method_call = new cancelTaskReservations_call(request, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class cancelTaskReservations_call extends org.apache.thrift.async.TAsyncMethodCall { private edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request; public cancelTaskReservations_call(edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.request = request; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelTaskReservations", org.apache.thrift.protocol.TMessageType.CALL, 0)); cancelTaskReservations_args args = new cancelTaskReservations_args(); args.setRequest(request); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_cancelTaskReservations(); } } } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap>())); } protected Processor(I iface, Map> processMap) { super(iface, getProcessMap(processMap)); } private static Map> getProcessMap(Map> processMap) { processMap.put("enqueueTaskReservations", new enqueueTaskReservations()); processMap.put("cancelTaskReservations", new cancelTaskReservations()); return processMap; } private static class enqueueTaskReservations extends org.apache.thrift.ProcessFunction { public enqueueTaskReservations() { super("enqueueTaskReservations"); } protected enqueueTaskReservations_args getEmptyArgsInstance() { return new enqueueTaskReservations_args(); } protected enqueueTaskReservations_result getResult(I iface, enqueueTaskReservations_args args) throws org.apache.thrift.TException { enqueueTaskReservations_result result = new enqueueTaskReservations_result(); result.success = iface.enqueueTaskReservations(args.request); result.setSuccessIsSet(true); return result; } } private static class cancelTaskReservations extends org.apache.thrift.ProcessFunction { public cancelTaskReservations() { super("cancelTaskReservations"); } protected cancelTaskReservations_args getEmptyArgsInstance() { return new cancelTaskReservations_args(); } protected cancelTaskReservations_result getResult(I iface, cancelTaskReservations_args args) throws org.apache.thrift.TException { cancelTaskReservations_result result = new cancelTaskReservations_result(); iface.cancelTaskReservations(args.request); return result; } } } public static class enqueueTaskReservations_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enqueueTaskReservations_args"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new enqueueTaskReservations_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new enqueueTaskReservations_argsTupleSchemeFactory()); } public edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { REQUEST((short)1, "request"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // REQUEST return REQUEST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enqueueTaskReservations_args.class, metaDataMap); } public enqueueTaskReservations_args() { } public enqueueTaskReservations_args( edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request) { this(); this.request = request; } /** * Performs a deep copy on other. */ public enqueueTaskReservations_args(enqueueTaskReservations_args other) { if (other.isSetRequest()) { this.request = new edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest(other.request); } } public enqueueTaskReservations_args deepCopy() { return new enqueueTaskReservations_args(this); } public void clear() { this.request = null; } public edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest getRequest() { return this.request; } public enqueueTaskReservations_args setRequest(edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest request) { this.request = request; return this; } public void unsetRequest() { this.request = null; } /** Returns true if field request is set (has been assigned a value) and false otherwise */ public boolean isSetRequest() { return this.request != null; } public void setRequestIsSet(boolean value) { if (!value) { this.request = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQUEST: if (value == null) { unsetRequest(); } else { setRequest((edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQUEST: return getRequest(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case REQUEST: return isSetRequest(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof enqueueTaskReservations_args) return this.equals((enqueueTaskReservations_args)that); return false; } public boolean equals(enqueueTaskReservations_args that) { if (that == null) return false; boolean this_present_request = true && this.isSetRequest(); boolean that_present_request = true && that.isSetRequest(); if (this_present_request || that_present_request) { if (!(this_present_request && that_present_request)) return false; if (!this.request.equals(that.request)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(enqueueTaskReservations_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; enqueueTaskReservations_args typedOther = (enqueueTaskReservations_args)other; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(typedOther.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, typedOther.request); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("enqueueTaskReservations_args("); boolean first = true; sb.append("request:"); if (this.request == null) { sb.append("null"); } else { sb.append(this.request); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class enqueueTaskReservations_argsStandardSchemeFactory implements SchemeFactory { public enqueueTaskReservations_argsStandardScheme getScheme() { return new enqueueTaskReservations_argsStandardScheme(); } } private static class enqueueTaskReservations_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, enqueueTaskReservations_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQUEST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.request = new edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, enqueueTaskReservations_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.request != null) { oprot.writeFieldBegin(REQUEST_FIELD_DESC); struct.request.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class enqueueTaskReservations_argsTupleSchemeFactory implements SchemeFactory { public enqueueTaskReservations_argsTupleScheme getScheme() { return new enqueueTaskReservations_argsTupleScheme(); } } private static class enqueueTaskReservations_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, enqueueTaskReservations_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRequest()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRequest()) { struct.request.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, enqueueTaskReservations_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class enqueueTaskReservations_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enqueueTaskReservations_result"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new enqueueTaskReservations_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new enqueueTaskReservations_resultTupleSchemeFactory()); } public boolean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enqueueTaskReservations_result.class, metaDataMap); } public enqueueTaskReservations_result() { } public enqueueTaskReservations_result( boolean success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public enqueueTaskReservations_result(enqueueTaskReservations_result other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.success = other.success; } public enqueueTaskReservations_result deepCopy() { return new enqueueTaskReservations_result(this); } public void clear() { setSuccessIsSet(false); this.success = false; } public boolean isSuccess() { return this.success; } public enqueueTaskReservations_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof enqueueTaskReservations_result) return this.equals((enqueueTaskReservations_result)that); return false; } public boolean equals(enqueueTaskReservations_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(enqueueTaskReservations_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; enqueueTaskReservations_result typedOther = (enqueueTaskReservations_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("enqueueTaskReservations_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class enqueueTaskReservations_resultStandardSchemeFactory implements SchemeFactory { public enqueueTaskReservations_resultStandardScheme getScheme() { return new enqueueTaskReservations_resultStandardScheme(); } } private static class enqueueTaskReservations_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, enqueueTaskReservations_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, enqueueTaskReservations_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class enqueueTaskReservations_resultTupleSchemeFactory implements SchemeFactory { public enqueueTaskReservations_resultTupleScheme getScheme() { return new enqueueTaskReservations_resultTupleScheme(); } } private static class enqueueTaskReservations_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, enqueueTaskReservations_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, enqueueTaskReservations_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } } } } public static class cancelTaskReservations_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelTaskReservations_args"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new cancelTaskReservations_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new cancelTaskReservations_argsTupleSchemeFactory()); } public edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { REQUEST((short)1, "request"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // REQUEST return REQUEST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelTaskReservations_args.class, metaDataMap); } public cancelTaskReservations_args() { } public cancelTaskReservations_args( edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request) { this(); this.request = request; } /** * Performs a deep copy on other. */ public cancelTaskReservations_args(cancelTaskReservations_args other) { if (other.isSetRequest()) { this.request = new edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest(other.request); } } public cancelTaskReservations_args deepCopy() { return new cancelTaskReservations_args(this); } public void clear() { this.request = null; } public edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest getRequest() { return this.request; } public cancelTaskReservations_args setRequest(edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest request) { this.request = request; return this; } public void unsetRequest() { this.request = null; } /** Returns true if field request is set (has been assigned a value) and false otherwise */ public boolean isSetRequest() { return this.request != null; } public void setRequestIsSet(boolean value) { if (!value) { this.request = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQUEST: if (value == null) { unsetRequest(); } else { setRequest((edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQUEST: return getRequest(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case REQUEST: return isSetRequest(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof cancelTaskReservations_args) return this.equals((cancelTaskReservations_args)that); return false; } public boolean equals(cancelTaskReservations_args that) { if (that == null) return false; boolean this_present_request = true && this.isSetRequest(); boolean that_present_request = true && that.isSetRequest(); if (this_present_request || that_present_request) { if (!(this_present_request && that_present_request)) return false; if (!this.request.equals(that.request)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(cancelTaskReservations_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; cancelTaskReservations_args typedOther = (cancelTaskReservations_args)other; lastComparison = Boolean.valueOf(isSetRequest()).compareTo(typedOther.isSetRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetRequest()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, typedOther.request); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("cancelTaskReservations_args("); boolean first = true; sb.append("request:"); if (this.request == null) { sb.append("null"); } else { sb.append(this.request); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class cancelTaskReservations_argsStandardSchemeFactory implements SchemeFactory { public cancelTaskReservations_argsStandardScheme getScheme() { return new cancelTaskReservations_argsStandardScheme(); } } private static class cancelTaskReservations_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, cancelTaskReservations_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQUEST if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.request = new edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, cancelTaskReservations_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.request != null) { oprot.writeFieldBegin(REQUEST_FIELD_DESC); struct.request.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class cancelTaskReservations_argsTupleSchemeFactory implements SchemeFactory { public cancelTaskReservations_argsTupleScheme getScheme() { return new cancelTaskReservations_argsTupleScheme(); } } private static class cancelTaskReservations_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, cancelTaskReservations_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRequest()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRequest()) { struct.request.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, cancelTaskReservations_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.request = new edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); } } } } public static class cancelTaskReservations_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelTaskReservations_result"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new cancelTaskReservations_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new cancelTaskReservations_resultTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelTaskReservations_result.class, metaDataMap); } public cancelTaskReservations_result() { } /** * Performs a deep copy on other. */ public cancelTaskReservations_result(cancelTaskReservations_result other) { } public cancelTaskReservations_result deepCopy() { return new cancelTaskReservations_result(this); } public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof cancelTaskReservations_result) return this.equals((cancelTaskReservations_result)that); return false; } public boolean equals(cancelTaskReservations_result that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(cancelTaskReservations_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; cancelTaskReservations_result typedOther = (cancelTaskReservations_result)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("cancelTaskReservations_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class cancelTaskReservations_resultStandardSchemeFactory implements SchemeFactory { public cancelTaskReservations_resultStandardScheme getScheme() { return new cancelTaskReservations_resultStandardScheme(); } } private static class cancelTaskReservations_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, cancelTaskReservations_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, cancelTaskReservations_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class cancelTaskReservations_resultTupleSchemeFactory implements SchemeFactory { public cancelTaskReservations_resultTupleScheme getScheme() { return new cancelTaskReservations_resultTupleScheme(); } } private static class cancelTaskReservations_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, cancelTaskReservations_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, cancelTaskReservations_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/LoadSpec.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class LoadSpec implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LoadSpec"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new LoadSpecStandardSchemeFactory()); schemes.put(TupleScheme.class, new LoadSpecTupleSchemeFactory()); } public double load; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { LOAD((short)1, "load"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // LOAD return LOAD; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __LOAD_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.LOAD, new org.apache.thrift.meta_data.FieldMetaData("load", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LoadSpec.class, metaDataMap); } public LoadSpec() { } public LoadSpec( double load) { this(); this.load = load; setLoadIsSet(true); } /** * Performs a deep copy on other. */ public LoadSpec(LoadSpec other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.load = other.load; } public LoadSpec deepCopy() { return new LoadSpec(this); } public void clear() { setLoadIsSet(false); this.load = 0.0; } public double getLoad() { return this.load; } public LoadSpec setLoad(double load) { this.load = load; setLoadIsSet(true); return this; } public void unsetLoad() { __isset_bit_vector.clear(__LOAD_ISSET_ID); } /** Returns true if field load is set (has been assigned a value) and false otherwise */ public boolean isSetLoad() { return __isset_bit_vector.get(__LOAD_ISSET_ID); } public void setLoadIsSet(boolean value) { __isset_bit_vector.set(__LOAD_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case LOAD: if (value == null) { unsetLoad(); } else { setLoad((Double)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case LOAD: return Double.valueOf(getLoad()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case LOAD: return isSetLoad(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof LoadSpec) return this.equals((LoadSpec)that); return false; } public boolean equals(LoadSpec that) { if (that == null) return false; boolean this_present_load = true; boolean that_present_load = true; if (this_present_load || that_present_load) { if (!(this_present_load && that_present_load)) return false; if (this.load != that.load) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(LoadSpec other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; LoadSpec typedOther = (LoadSpec)other; lastComparison = Boolean.valueOf(isSetLoad()).compareTo(typedOther.isSetLoad()); if (lastComparison != 0) { return lastComparison; } if (isSetLoad()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.load, typedOther.load); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("LoadSpec("); boolean first = true; sb.append("load:"); sb.append(this.load); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class LoadSpecStandardSchemeFactory implements SchemeFactory { public LoadSpecStandardScheme getScheme() { return new LoadSpecStandardScheme(); } } private static class LoadSpecStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, LoadSpec struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // LOAD if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.load = iprot.readDouble(); struct.setLoadIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, LoadSpec struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(LOAD_FIELD_DESC); oprot.writeDouble(struct.load); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class LoadSpecTupleSchemeFactory implements SchemeFactory { public LoadSpecTupleScheme getScheme() { return new LoadSpecTupleScheme(); } } private static class LoadSpecTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, LoadSpec struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetLoad()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetLoad()) { oprot.writeDouble(struct.load); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, LoadSpec struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.load = iprot.readDouble(); struct.setLoadIsSet(true); } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/NodeMonitorService.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class NodeMonitorService { public interface Iface { public boolean registerBackend(String app, String listenSocket) throws org.apache.thrift.TException; public void tasksFinished(List tasks) throws org.apache.thrift.TException; public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException; } public interface AsyncIface { public void registerBackend(String app, String listenSocket, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void tasksFinished(List tasks, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public boolean registerBackend(String app, String listenSocket) throws org.apache.thrift.TException { send_registerBackend(app, listenSocket); return recv_registerBackend(); } public void send_registerBackend(String app, String listenSocket) throws org.apache.thrift.TException { registerBackend_args args = new registerBackend_args(); args.setApp(app); args.setListenSocket(listenSocket); sendBase("registerBackend", args); } public boolean recv_registerBackend() throws org.apache.thrift.TException { registerBackend_result result = new registerBackend_result(); receiveBase(result, "registerBackend"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerBackend failed: unknown result"); } public void tasksFinished(List tasks) throws org.apache.thrift.TException { send_tasksFinished(tasks); recv_tasksFinished(); } public void send_tasksFinished(List tasks) throws org.apache.thrift.TException { tasksFinished_args args = new tasksFinished_args(); args.setTasks(tasks); sendBase("tasksFinished", args); } public void recv_tasksFinished() throws org.apache.thrift.TException { tasksFinished_result result = new tasksFinished_result(); receiveBase(result, "tasksFinished"); return; } public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException { send_sendFrontendMessage(app, taskId, status, message); recv_sendFrontendMessage(); } public void send_sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException { sendFrontendMessage_args args = new sendFrontendMessage_args(); args.setApp(app); args.setTaskId(taskId); args.setStatus(status); args.setMessage(message); sendBase("sendFrontendMessage", args); } public void recv_sendFrontendMessage() throws org.apache.thrift.TException { sendFrontendMessage_result result = new sendFrontendMessage_result(); receiveBase(result, "sendFrontendMessage"); return; } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void registerBackend(String app, String listenSocket, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); registerBackend_call method_call = new registerBackend_call(app, listenSocket, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class registerBackend_call extends org.apache.thrift.async.TAsyncMethodCall { private String app; private String listenSocket; public registerBackend_call(String app, String listenSocket, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.app = app; this.listenSocket = listenSocket; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerBackend", org.apache.thrift.protocol.TMessageType.CALL, 0)); registerBackend_args args = new registerBackend_args(); args.setApp(app); args.setListenSocket(listenSocket); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_registerBackend(); } } public void tasksFinished(List tasks, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); tasksFinished_call method_call = new tasksFinished_call(tasks, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class tasksFinished_call extends org.apache.thrift.async.TAsyncMethodCall { private List tasks; public tasksFinished_call(List tasks, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tasks = tasks; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("tasksFinished", org.apache.thrift.protocol.TMessageType.CALL, 0)); tasksFinished_args args = new tasksFinished_args(); args.setTasks(tasks); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_tasksFinished(); } } public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); sendFrontendMessage_call method_call = new sendFrontendMessage_call(app, taskId, status, message, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class sendFrontendMessage_call extends org.apache.thrift.async.TAsyncMethodCall { private String app; private edu.berkeley.sparrow.thrift.TFullTaskId taskId; private int status; private ByteBuffer message; public sendFrontendMessage_call(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.app = app; this.taskId = taskId; this.status = status; this.message = message; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sendFrontendMessage", org.apache.thrift.protocol.TMessageType.CALL, 0)); sendFrontendMessage_args args = new sendFrontendMessage_args(); args.setApp(app); args.setTaskId(taskId); args.setStatus(status); args.setMessage(message); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_sendFrontendMessage(); } } } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap>())); } protected Processor(I iface, Map> processMap) { super(iface, getProcessMap(processMap)); } private static Map> getProcessMap(Map> processMap) { processMap.put("registerBackend", new registerBackend()); processMap.put("tasksFinished", new tasksFinished()); processMap.put("sendFrontendMessage", new sendFrontendMessage()); return processMap; } private static class registerBackend extends org.apache.thrift.ProcessFunction { public registerBackend() { super("registerBackend"); } protected registerBackend_args getEmptyArgsInstance() { return new registerBackend_args(); } protected registerBackend_result getResult(I iface, registerBackend_args args) throws org.apache.thrift.TException { registerBackend_result result = new registerBackend_result(); result.success = iface.registerBackend(args.app, args.listenSocket); result.setSuccessIsSet(true); return result; } } private static class tasksFinished extends org.apache.thrift.ProcessFunction { public tasksFinished() { super("tasksFinished"); } protected tasksFinished_args getEmptyArgsInstance() { return new tasksFinished_args(); } protected tasksFinished_result getResult(I iface, tasksFinished_args args) throws org.apache.thrift.TException { tasksFinished_result result = new tasksFinished_result(); iface.tasksFinished(args.tasks); return result; } } private static class sendFrontendMessage extends org.apache.thrift.ProcessFunction { public sendFrontendMessage() { super("sendFrontendMessage"); } protected sendFrontendMessage_args getEmptyArgsInstance() { return new sendFrontendMessage_args(); } protected sendFrontendMessage_result getResult(I iface, sendFrontendMessage_args args) throws org.apache.thrift.TException { sendFrontendMessage_result result = new sendFrontendMessage_result(); iface.sendFrontendMessage(args.app, args.taskId, args.status, args.message); return result; } } } public static class registerBackend_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerBackend_args"); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new registerBackend_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new registerBackend_argsTupleSchemeFactory()); } public String app; // required public String listenSocket; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { APP((short)1, "app"), LISTEN_SOCKET((short)2, "listenSocket"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // APP return APP; case 2: // LISTEN_SOCKET return LISTEN_SOCKET; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.APP, new org.apache.thrift.meta_data.FieldMetaData("app", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.LISTEN_SOCKET, new org.apache.thrift.meta_data.FieldMetaData("listenSocket", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerBackend_args.class, metaDataMap); } public registerBackend_args() { } public registerBackend_args( String app, String listenSocket) { this(); this.app = app; this.listenSocket = listenSocket; } /** * Performs a deep copy on other. */ public registerBackend_args(registerBackend_args other) { if (other.isSetApp()) { this.app = other.app; } if (other.isSetListenSocket()) { this.listenSocket = other.listenSocket; } } public registerBackend_args deepCopy() { return new registerBackend_args(this); } public void clear() { this.app = null; this.listenSocket = null; } public String getApp() { return this.app; } public registerBackend_args setApp(String app) { this.app = app; return this; } public void unsetApp() { this.app = null; } /** Returns true if field app is set (has been assigned a value) and false otherwise */ public boolean isSetApp() { return this.app != null; } public void setAppIsSet(boolean value) { if (!value) { this.app = null; } } public String getListenSocket() { return this.listenSocket; } public registerBackend_args setListenSocket(String listenSocket) { this.listenSocket = listenSocket; return this; } public void unsetListenSocket() { this.listenSocket = null; } /** Returns true if field listenSocket is set (has been assigned a value) and false otherwise */ public boolean isSetListenSocket() { return this.listenSocket != null; } public void setListenSocketIsSet(boolean value) { if (!value) { this.listenSocket = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case APP: if (value == null) { unsetApp(); } else { setApp((String)value); } break; case LISTEN_SOCKET: if (value == null) { unsetListenSocket(); } else { setListenSocket((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case APP: return getApp(); case LISTEN_SOCKET: return getListenSocket(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case APP: return isSetApp(); case LISTEN_SOCKET: return isSetListenSocket(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof registerBackend_args) return this.equals((registerBackend_args)that); return false; } public boolean equals(registerBackend_args that) { if (that == null) return false; boolean this_present_app = true && this.isSetApp(); boolean that_present_app = true && that.isSetApp(); if (this_present_app || that_present_app) { if (!(this_present_app && that_present_app)) return false; if (!this.app.equals(that.app)) return false; } boolean this_present_listenSocket = true && this.isSetListenSocket(); boolean that_present_listenSocket = true && that.isSetListenSocket(); if (this_present_listenSocket || that_present_listenSocket) { if (!(this_present_listenSocket && that_present_listenSocket)) return false; if (!this.listenSocket.equals(that.listenSocket)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(registerBackend_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; registerBackend_args typedOther = (registerBackend_args)other; lastComparison = Boolean.valueOf(isSetApp()).compareTo(typedOther.isSetApp()); if (lastComparison != 0) { return lastComparison; } if (isSetApp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app, typedOther.app); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetListenSocket()).compareTo(typedOther.isSetListenSocket()); if (lastComparison != 0) { return lastComparison; } if (isSetListenSocket()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.listenSocket, typedOther.listenSocket); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("registerBackend_args("); boolean first = true; sb.append("app:"); if (this.app == null) { sb.append("null"); } else { sb.append(this.app); } first = false; if (!first) sb.append(", "); sb.append("listenSocket:"); if (this.listenSocket == null) { sb.append("null"); } else { sb.append(this.listenSocket); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class registerBackend_argsStandardSchemeFactory implements SchemeFactory { public registerBackend_argsStandardScheme getScheme() { return new registerBackend_argsStandardScheme(); } } private static class registerBackend_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, registerBackend_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // APP if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.app = iprot.readString(); struct.setAppIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // LISTEN_SOCKET if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.listenSocket = iprot.readString(); struct.setListenSocketIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, registerBackend_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.app != null) { oprot.writeFieldBegin(APP_FIELD_DESC); oprot.writeString(struct.app); oprot.writeFieldEnd(); } if (struct.listenSocket != null) { oprot.writeFieldBegin(LISTEN_SOCKET_FIELD_DESC); oprot.writeString(struct.listenSocket); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class registerBackend_argsTupleSchemeFactory implements SchemeFactory { public registerBackend_argsTupleScheme getScheme() { return new registerBackend_argsTupleScheme(); } } private static class registerBackend_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, registerBackend_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetApp()) { optionals.set(0); } if (struct.isSetListenSocket()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetApp()) { oprot.writeString(struct.app); } if (struct.isSetListenSocket()) { oprot.writeString(struct.listenSocket); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, registerBackend_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.app = iprot.readString(); struct.setAppIsSet(true); } if (incoming.get(1)) { struct.listenSocket = iprot.readString(); struct.setListenSocketIsSet(true); } } } } public static class registerBackend_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerBackend_result"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new registerBackend_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new registerBackend_resultTupleSchemeFactory()); } public boolean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerBackend_result.class, metaDataMap); } public registerBackend_result() { } public registerBackend_result( boolean success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public registerBackend_result(registerBackend_result other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.success = other.success; } public registerBackend_result deepCopy() { return new registerBackend_result(this); } public void clear() { setSuccessIsSet(false); this.success = false; } public boolean isSuccess() { return this.success; } public registerBackend_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof registerBackend_result) return this.equals((registerBackend_result)that); return false; } public boolean equals(registerBackend_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(registerBackend_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; registerBackend_result typedOther = (registerBackend_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("registerBackend_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class registerBackend_resultStandardSchemeFactory implements SchemeFactory { public registerBackend_resultStandardScheme getScheme() { return new registerBackend_resultStandardScheme(); } } private static class registerBackend_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, registerBackend_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, registerBackend_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class registerBackend_resultTupleSchemeFactory implements SchemeFactory { public registerBackend_resultTupleScheme getScheme() { return new registerBackend_resultTupleScheme(); } } private static class registerBackend_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, registerBackend_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, registerBackend_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } } } } public static class tasksFinished_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("tasksFinished_args"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new tasksFinished_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new tasksFinished_argsTupleSchemeFactory()); } public List tasks; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TASKS((short)1, "tasks"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TASKS return TASKS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TASKS, new org.apache.thrift.meta_data.FieldMetaData("tasks", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TFullTaskId.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(tasksFinished_args.class, metaDataMap); } public tasksFinished_args() { } public tasksFinished_args( List tasks) { this(); this.tasks = tasks; } /** * Performs a deep copy on other. */ public tasksFinished_args(tasksFinished_args other) { if (other.isSetTasks()) { List __this__tasks = new ArrayList(); for (edu.berkeley.sparrow.thrift.TFullTaskId other_element : other.tasks) { __this__tasks.add(new edu.berkeley.sparrow.thrift.TFullTaskId(other_element)); } this.tasks = __this__tasks; } } public tasksFinished_args deepCopy() { return new tasksFinished_args(this); } public void clear() { this.tasks = null; } public int getTasksSize() { return (this.tasks == null) ? 0 : this.tasks.size(); } public java.util.Iterator getTasksIterator() { return (this.tasks == null) ? null : this.tasks.iterator(); } public void addToTasks(edu.berkeley.sparrow.thrift.TFullTaskId elem) { if (this.tasks == null) { this.tasks = new ArrayList(); } this.tasks.add(elem); } public List getTasks() { return this.tasks; } public tasksFinished_args setTasks(List tasks) { this.tasks = tasks; return this; } public void unsetTasks() { this.tasks = null; } /** Returns true if field tasks is set (has been assigned a value) and false otherwise */ public boolean isSetTasks() { return this.tasks != null; } public void setTasksIsSet(boolean value) { if (!value) { this.tasks = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TASKS: if (value == null) { unsetTasks(); } else { setTasks((List)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TASKS: return getTasks(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TASKS: return isSetTasks(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof tasksFinished_args) return this.equals((tasksFinished_args)that); return false; } public boolean equals(tasksFinished_args that) { if (that == null) return false; boolean this_present_tasks = true && this.isSetTasks(); boolean that_present_tasks = true && that.isSetTasks(); if (this_present_tasks || that_present_tasks) { if (!(this_present_tasks && that_present_tasks)) return false; if (!this.tasks.equals(that.tasks)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(tasksFinished_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; tasksFinished_args typedOther = (tasksFinished_args)other; lastComparison = Boolean.valueOf(isSetTasks()).compareTo(typedOther.isSetTasks()); if (lastComparison != 0) { return lastComparison; } if (isSetTasks()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tasks, typedOther.tasks); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("tasksFinished_args("); boolean first = true; sb.append("tasks:"); if (this.tasks == null) { sb.append("null"); } else { sb.append(this.tasks); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class tasksFinished_argsStandardSchemeFactory implements SchemeFactory { public tasksFinished_argsStandardScheme getScheme() { return new tasksFinished_argsStandardScheme(); } } private static class tasksFinished_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, tasksFinished_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TASKS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); struct.tasks = new ArrayList(_list8.size); for (int _i9 = 0; _i9 < _list8.size; ++_i9) { edu.berkeley.sparrow.thrift.TFullTaskId _elem10; // required _elem10 = new edu.berkeley.sparrow.thrift.TFullTaskId(); _elem10.read(iprot); struct.tasks.add(_elem10); } iprot.readListEnd(); } struct.setTasksIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, tasksFinished_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.tasks != null) { oprot.writeFieldBegin(TASKS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tasks.size())); for (edu.berkeley.sparrow.thrift.TFullTaskId _iter11 : struct.tasks) { _iter11.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class tasksFinished_argsTupleSchemeFactory implements SchemeFactory { public tasksFinished_argsTupleScheme getScheme() { return new tasksFinished_argsTupleScheme(); } } private static class tasksFinished_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, tasksFinished_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetTasks()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetTasks()) { { oprot.writeI32(struct.tasks.size()); for (edu.berkeley.sparrow.thrift.TFullTaskId _iter12 : struct.tasks) { _iter12.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, tasksFinished_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.tasks = new ArrayList(_list13.size); for (int _i14 = 0; _i14 < _list13.size; ++_i14) { edu.berkeley.sparrow.thrift.TFullTaskId _elem15; // required _elem15 = new edu.berkeley.sparrow.thrift.TFullTaskId(); _elem15.read(iprot); struct.tasks.add(_elem15); } } struct.setTasksIsSet(true); } } } } public static class tasksFinished_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("tasksFinished_result"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new tasksFinished_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new tasksFinished_resultTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(tasksFinished_result.class, metaDataMap); } public tasksFinished_result() { } /** * Performs a deep copy on other. */ public tasksFinished_result(tasksFinished_result other) { } public tasksFinished_result deepCopy() { return new tasksFinished_result(this); } public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof tasksFinished_result) return this.equals((tasksFinished_result)that); return false; } public boolean equals(tasksFinished_result that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(tasksFinished_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; tasksFinished_result typedOther = (tasksFinished_result)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("tasksFinished_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class tasksFinished_resultStandardSchemeFactory implements SchemeFactory { public tasksFinished_resultStandardScheme getScheme() { return new tasksFinished_resultStandardScheme(); } } private static class tasksFinished_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, tasksFinished_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, tasksFinished_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class tasksFinished_resultTupleSchemeFactory implements SchemeFactory { public tasksFinished_resultTupleScheme getScheme() { return new tasksFinished_resultTupleScheme(); } } private static class tasksFinished_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, tasksFinished_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, tasksFinished_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class sendFrontendMessage_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendFrontendMessage_args"); 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); 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); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new sendFrontendMessage_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new sendFrontendMessage_argsTupleSchemeFactory()); } public String app; // required public edu.berkeley.sparrow.thrift.TFullTaskId taskId; // required public int status; // required public ByteBuffer message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { APP((short)1, "app"), TASK_ID((short)2, "taskId"), STATUS((short)3, "status"), MESSAGE((short)4, "message"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // APP return APP; case 2: // TASK_ID return TASK_ID; case 3: // STATUS return STATUS; case 4: // MESSAGE return MESSAGE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __STATUS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.APP, new org.apache.thrift.meta_data.FieldMetaData("app", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TFullTaskId.class))); tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendFrontendMessage_args.class, metaDataMap); } public sendFrontendMessage_args() { } public sendFrontendMessage_args( String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) { this(); this.app = app; this.taskId = taskId; this.status = status; setStatusIsSet(true); this.message = message; } /** * Performs a deep copy on other. */ public sendFrontendMessage_args(sendFrontendMessage_args other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetApp()) { this.app = other.app; } if (other.isSetTaskId()) { this.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(other.taskId); } this.status = other.status; if (other.isSetMessage()) { this.message = org.apache.thrift.TBaseHelper.copyBinary(other.message); ; } } public sendFrontendMessage_args deepCopy() { return new sendFrontendMessage_args(this); } public void clear() { this.app = null; this.taskId = null; setStatusIsSet(false); this.status = 0; this.message = null; } public String getApp() { return this.app; } public sendFrontendMessage_args setApp(String app) { this.app = app; return this; } public void unsetApp() { this.app = null; } /** Returns true if field app is set (has been assigned a value) and false otherwise */ public boolean isSetApp() { return this.app != null; } public void setAppIsSet(boolean value) { if (!value) { this.app = null; } } public edu.berkeley.sparrow.thrift.TFullTaskId getTaskId() { return this.taskId; } public sendFrontendMessage_args setTaskId(edu.berkeley.sparrow.thrift.TFullTaskId taskId) { this.taskId = taskId; return this; } public void unsetTaskId() { this.taskId = null; } /** Returns true if field taskId is set (has been assigned a value) and false otherwise */ public boolean isSetTaskId() { return this.taskId != null; } public void setTaskIdIsSet(boolean value) { if (!value) { this.taskId = null; } } public int getStatus() { return this.status; } public sendFrontendMessage_args setStatus(int status) { this.status = status; setStatusIsSet(true); return this; } public void unsetStatus() { __isset_bit_vector.clear(__STATUS_ISSET_ID); } /** Returns true if field status is set (has been assigned a value) and false otherwise */ public boolean isSetStatus() { return __isset_bit_vector.get(__STATUS_ISSET_ID); } public void setStatusIsSet(boolean value) { __isset_bit_vector.set(__STATUS_ISSET_ID, value); } public byte[] getMessage() { setMessage(org.apache.thrift.TBaseHelper.rightSize(message)); return message == null ? null : message.array(); } public ByteBuffer bufferForMessage() { return message; } public sendFrontendMessage_args setMessage(byte[] message) { setMessage(message == null ? (ByteBuffer)null : ByteBuffer.wrap(message)); return this; } public sendFrontendMessage_args setMessage(ByteBuffer message) { this.message = message; return this; } public void unsetMessage() { this.message = null; } /** Returns true if field message is set (has been assigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } public void setMessageIsSet(boolean value) { if (!value) { this.message = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case APP: if (value == null) { unsetApp(); } else { setApp((String)value); } break; case TASK_ID: if (value == null) { unsetTaskId(); } else { setTaskId((edu.berkeley.sparrow.thrift.TFullTaskId)value); } break; case STATUS: if (value == null) { unsetStatus(); } else { setStatus((Integer)value); } break; case MESSAGE: if (value == null) { unsetMessage(); } else { setMessage((ByteBuffer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case APP: return getApp(); case TASK_ID: return getTaskId(); case STATUS: return Integer.valueOf(getStatus()); case MESSAGE: return getMessage(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case APP: return isSetApp(); case TASK_ID: return isSetTaskId(); case STATUS: return isSetStatus(); case MESSAGE: return isSetMessage(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof sendFrontendMessage_args) return this.equals((sendFrontendMessage_args)that); return false; } public boolean equals(sendFrontendMessage_args that) { if (that == null) return false; boolean this_present_app = true && this.isSetApp(); boolean that_present_app = true && that.isSetApp(); if (this_present_app || that_present_app) { if (!(this_present_app && that_present_app)) return false; if (!this.app.equals(that.app)) return false; } boolean this_present_taskId = true && this.isSetTaskId(); boolean that_present_taskId = true && that.isSetTaskId(); if (this_present_taskId || that_present_taskId) { if (!(this_present_taskId && that_present_taskId)) return false; if (!this.taskId.equals(that.taskId)) return false; } boolean this_present_status = true; boolean that_present_status = true; if (this_present_status || that_present_status) { if (!(this_present_status && that_present_status)) return false; if (this.status != that.status) return false; } boolean this_present_message = true && this.isSetMessage(); boolean that_present_message = true && that.isSetMessage(); if (this_present_message || that_present_message) { if (!(this_present_message && that_present_message)) return false; if (!this.message.equals(that.message)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(sendFrontendMessage_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; sendFrontendMessage_args typedOther = (sendFrontendMessage_args)other; lastComparison = Boolean.valueOf(isSetApp()).compareTo(typedOther.isSetApp()); if (lastComparison != 0) { return lastComparison; } if (isSetApp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app, typedOther.app); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId()); if (lastComparison != 0) { return lastComparison; } if (isSetTaskId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, typedOther.taskId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetMessage()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("sendFrontendMessage_args("); boolean first = true; sb.append("app:"); if (this.app == null) { sb.append("null"); } else { sb.append(this.app); } first = false; if (!first) sb.append(", "); sb.append("taskId:"); if (this.taskId == null) { sb.append("null"); } else { sb.append(this.taskId); } first = false; if (!first) sb.append(", "); sb.append("status:"); sb.append(this.status); first = false; if (!first) sb.append(", "); sb.append("message:"); if (this.message == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.message, sb); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class sendFrontendMessage_argsStandardSchemeFactory implements SchemeFactory { public sendFrontendMessage_argsStandardScheme getScheme() { return new sendFrontendMessage_argsStandardScheme(); } } private static class sendFrontendMessage_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, sendFrontendMessage_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // APP if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.app = iprot.readString(); struct.setAppIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TASK_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(); struct.taskId.read(iprot); struct.setTaskIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // STATUS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.status = iprot.readI32(); struct.setStatusIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // MESSAGE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.message = iprot.readBinary(); struct.setMessageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, sendFrontendMessage_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.app != null) { oprot.writeFieldBegin(APP_FIELD_DESC); oprot.writeString(struct.app); oprot.writeFieldEnd(); } if (struct.taskId != null) { oprot.writeFieldBegin(TASK_ID_FIELD_DESC); struct.taskId.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(STATUS_FIELD_DESC); oprot.writeI32(struct.status); oprot.writeFieldEnd(); if (struct.message != null) { oprot.writeFieldBegin(MESSAGE_FIELD_DESC); oprot.writeBinary(struct.message); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class sendFrontendMessage_argsTupleSchemeFactory implements SchemeFactory { public sendFrontendMessage_argsTupleScheme getScheme() { return new sendFrontendMessage_argsTupleScheme(); } } private static class sendFrontendMessage_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetApp()) { optionals.set(0); } if (struct.isSetTaskId()) { optionals.set(1); } if (struct.isSetStatus()) { optionals.set(2); } if (struct.isSetMessage()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetApp()) { oprot.writeString(struct.app); } if (struct.isSetTaskId()) { struct.taskId.write(oprot); } if (struct.isSetStatus()) { oprot.writeI32(struct.status); } if (struct.isSetMessage()) { oprot.writeBinary(struct.message); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.app = iprot.readString(); struct.setAppIsSet(true); } if (incoming.get(1)) { struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(); struct.taskId.read(iprot); struct.setTaskIdIsSet(true); } if (incoming.get(2)) { struct.status = iprot.readI32(); struct.setStatusIsSet(true); } if (incoming.get(3)) { struct.message = iprot.readBinary(); struct.setMessageIsSet(true); } } } } public static class sendFrontendMessage_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendFrontendMessage_result"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new sendFrontendMessage_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new sendFrontendMessage_resultTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendFrontendMessage_result.class, metaDataMap); } public sendFrontendMessage_result() { } /** * Performs a deep copy on other. */ public sendFrontendMessage_result(sendFrontendMessage_result other) { } public sendFrontendMessage_result deepCopy() { return new sendFrontendMessage_result(this); } public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof sendFrontendMessage_result) return this.equals((sendFrontendMessage_result)that); return false; } public boolean equals(sendFrontendMessage_result that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(sendFrontendMessage_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; sendFrontendMessage_result typedOther = (sendFrontendMessage_result)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("sendFrontendMessage_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class sendFrontendMessage_resultStandardSchemeFactory implements SchemeFactory { public sendFrontendMessage_resultStandardScheme getScheme() { return new sendFrontendMessage_resultStandardScheme(); } } private static class sendFrontendMessage_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, sendFrontendMessage_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, sendFrontendMessage_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class sendFrontendMessage_resultTupleSchemeFactory implements SchemeFactory { public sendFrontendMessage_resultTupleScheme getScheme() { return new sendFrontendMessage_resultTupleScheme(); } } private static class sendFrontendMessage_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/PongService.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class PongService { public interface Iface { public String ping(String data) throws org.apache.thrift.TException; } public interface AsyncIface { public void ping(String data, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public String ping(String data) throws org.apache.thrift.TException { send_ping(data); return recv_ping(); } public void send_ping(String data) throws org.apache.thrift.TException { ping_args args = new ping_args(); args.setData(data); sendBase("ping", args); } public String recv_ping() throws org.apache.thrift.TException { ping_result result = new ping_result(); receiveBase(result, "ping"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "ping failed: unknown result"); } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void ping(String data, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); ping_call method_call = new ping_call(data, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall { private String data; public ping_call(String data, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.data = data; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("ping", org.apache.thrift.protocol.TMessageType.CALL, 0)); ping_args args = new ping_args(); args.setData(data); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_ping(); } } } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap>())); } protected Processor(I iface, Map> processMap) { super(iface, getProcessMap(processMap)); } private static Map> getProcessMap(Map> processMap) { processMap.put("ping", new ping()); return processMap; } private static class ping extends org.apache.thrift.ProcessFunction { public ping() { super("ping"); } protected ping_args getEmptyArgsInstance() { return new ping_args(); } protected ping_result getResult(I iface, ping_args args) throws org.apache.thrift.TException { ping_result result = new ping_result(); result.success = iface.ping(args.data); return result; } } } public static class ping_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_args"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new ping_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new ping_argsTupleSchemeFactory()); } public String data; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { DATA((short)1, "data"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DATA return DATA; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_args.class, metaDataMap); } public ping_args() { } public ping_args( String data) { this(); this.data = data; } /** * Performs a deep copy on other. */ public ping_args(ping_args other) { if (other.isSetData()) { this.data = other.data; } } public ping_args deepCopy() { return new ping_args(this); } public void clear() { this.data = null; } public String getData() { return this.data; } public ping_args setData(String data) { this.data = data; return this; } public void unsetData() { this.data = null; } /** Returns true if field data is set (has been assigned a value) and false otherwise */ public boolean isSetData() { return this.data != null; } public void setDataIsSet(boolean value) { if (!value) { this.data = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DATA: if (value == null) { unsetData(); } else { setData((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DATA: return getData(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DATA: return isSetData(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof ping_args) return this.equals((ping_args)that); return false; } public boolean equals(ping_args that) { if (that == null) return false; boolean this_present_data = true && this.isSetData(); boolean that_present_data = true && that.isSetData(); if (this_present_data || that_present_data) { if (!(this_present_data && that_present_data)) return false; if (!this.data.equals(that.data)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(ping_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; ping_args typedOther = (ping_args)other; lastComparison = Boolean.valueOf(isSetData()).compareTo(typedOther.isSetData()); if (lastComparison != 0) { return lastComparison; } if (isSetData()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, typedOther.data); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("ping_args("); boolean first = true; sb.append("data:"); if (this.data == null) { sb.append("null"); } else { sb.append(this.data); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class ping_argsStandardSchemeFactory implements SchemeFactory { public ping_argsStandardScheme getScheme() { return new ping_argsStandardScheme(); } } private static class ping_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, ping_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DATA if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.data = iprot.readString(); struct.setDataIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, ping_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.data != null) { oprot.writeFieldBegin(DATA_FIELD_DESC); oprot.writeString(struct.data); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class ping_argsTupleSchemeFactory implements SchemeFactory { public ping_argsTupleScheme getScheme() { return new ping_argsTupleScheme(); } } private static class ping_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetData()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetData()) { oprot.writeString(struct.data); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.data = iprot.readString(); struct.setDataIsSet(true); } } } } public static class ping_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_result"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new ping_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new ping_resultTupleSchemeFactory()); } public String success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_result.class, metaDataMap); } public ping_result() { } public ping_result( String success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public ping_result(ping_result other) { if (other.isSetSuccess()) { this.success = other.success; } } public ping_result deepCopy() { return new ping_result(this); } public void clear() { this.success = null; } public String getSuccess() { return this.success; } public ping_result setSuccess(String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof ping_result) return this.equals((ping_result)that); return false; } public boolean equals(ping_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(ping_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; ping_result typedOther = (ping_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("ping_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class ping_resultStandardSchemeFactory implements SchemeFactory { public ping_resultStandardScheme getScheme() { return new ping_resultStandardScheme(); } } private static class ping_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, ping_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, ping_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class ping_resultTupleSchemeFactory implements SchemeFactory { public ping_resultTupleScheme getScheme() { return new ping_resultTupleScheme(); } } private static class ping_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/SchedulerService.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class SchedulerService { public interface Iface { public boolean registerFrontend(String app, String socketAddress) throws org.apache.thrift.TException; public void submitJob(edu.berkeley.sparrow.thrift.TSchedulingRequest req) throws edu.berkeley.sparrow.thrift.IncompleteRequestException, org.apache.thrift.TException; public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException; } public interface AsyncIface { public void registerFrontend(String app, String socketAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void submitJob(edu.berkeley.sparrow.thrift.TSchedulingRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public boolean registerFrontend(String app, String socketAddress) throws org.apache.thrift.TException { send_registerFrontend(app, socketAddress); return recv_registerFrontend(); } public void send_registerFrontend(String app, String socketAddress) throws org.apache.thrift.TException { registerFrontend_args args = new registerFrontend_args(); args.setApp(app); args.setSocketAddress(socketAddress); sendBase("registerFrontend", args); } public boolean recv_registerFrontend() throws org.apache.thrift.TException { registerFrontend_result result = new registerFrontend_result(); receiveBase(result, "registerFrontend"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerFrontend failed: unknown result"); } public void submitJob(edu.berkeley.sparrow.thrift.TSchedulingRequest req) throws edu.berkeley.sparrow.thrift.IncompleteRequestException, org.apache.thrift.TException { send_submitJob(req); recv_submitJob(); } public void send_submitJob(edu.berkeley.sparrow.thrift.TSchedulingRequest req) throws org.apache.thrift.TException { submitJob_args args = new submitJob_args(); args.setReq(req); sendBase("submitJob", args); } public void recv_submitJob() throws edu.berkeley.sparrow.thrift.IncompleteRequestException, org.apache.thrift.TException { submitJob_result result = new submitJob_result(); receiveBase(result, "submitJob"); if (result.e != null) { throw result.e; } return; } public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException { send_sendFrontendMessage(app, taskId, status, message); recv_sendFrontendMessage(); } public void send_sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) throws org.apache.thrift.TException { sendFrontendMessage_args args = new sendFrontendMessage_args(); args.setApp(app); args.setTaskId(taskId); args.setStatus(status); args.setMessage(message); sendBase("sendFrontendMessage", args); } public void recv_sendFrontendMessage() throws org.apache.thrift.TException { sendFrontendMessage_result result = new sendFrontendMessage_result(); receiveBase(result, "sendFrontendMessage"); return; } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void registerFrontend(String app, String socketAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); registerFrontend_call method_call = new registerFrontend_call(app, socketAddress, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class registerFrontend_call extends org.apache.thrift.async.TAsyncMethodCall { private String app; private String socketAddress; public registerFrontend_call(String app, String socketAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.app = app; this.socketAddress = socketAddress; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerFrontend", org.apache.thrift.protocol.TMessageType.CALL, 0)); registerFrontend_args args = new registerFrontend_args(); args.setApp(app); args.setSocketAddress(socketAddress); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_registerFrontend(); } } public void submitJob(edu.berkeley.sparrow.thrift.TSchedulingRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); submitJob_call method_call = new submitJob_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class submitJob_call extends org.apache.thrift.async.TAsyncMethodCall { private edu.berkeley.sparrow.thrift.TSchedulingRequest req; public submitJob_call(edu.berkeley.sparrow.thrift.TSchedulingRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("submitJob", org.apache.thrift.protocol.TMessageType.CALL, 0)); submitJob_args args = new submitJob_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws edu.berkeley.sparrow.thrift.IncompleteRequestException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_submitJob(); } } public void sendFrontendMessage(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); sendFrontendMessage_call method_call = new sendFrontendMessage_call(app, taskId, status, message, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class sendFrontendMessage_call extends org.apache.thrift.async.TAsyncMethodCall { private String app; private edu.berkeley.sparrow.thrift.TFullTaskId taskId; private int status; private ByteBuffer message; public sendFrontendMessage_call(String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.app = app; this.taskId = taskId; this.status = status; this.message = message; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sendFrontendMessage", org.apache.thrift.protocol.TMessageType.CALL, 0)); sendFrontendMessage_args args = new sendFrontendMessage_args(); args.setApp(app); args.setTaskId(taskId); args.setStatus(status); args.setMessage(message); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_sendFrontendMessage(); } } } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap>())); } protected Processor(I iface, Map> processMap) { super(iface, getProcessMap(processMap)); } private static Map> getProcessMap(Map> processMap) { processMap.put("registerFrontend", new registerFrontend()); processMap.put("submitJob", new submitJob()); processMap.put("sendFrontendMessage", new sendFrontendMessage()); return processMap; } private static class registerFrontend extends org.apache.thrift.ProcessFunction { public registerFrontend() { super("registerFrontend"); } protected registerFrontend_args getEmptyArgsInstance() { return new registerFrontend_args(); } protected registerFrontend_result getResult(I iface, registerFrontend_args args) throws org.apache.thrift.TException { registerFrontend_result result = new registerFrontend_result(); result.success = iface.registerFrontend(args.app, args.socketAddress); result.setSuccessIsSet(true); return result; } } private static class submitJob extends org.apache.thrift.ProcessFunction { public submitJob() { super("submitJob"); } protected submitJob_args getEmptyArgsInstance() { return new submitJob_args(); } protected submitJob_result getResult(I iface, submitJob_args args) throws org.apache.thrift.TException { submitJob_result result = new submitJob_result(); try { iface.submitJob(args.req); } catch (edu.berkeley.sparrow.thrift.IncompleteRequestException e) { result.e = e; } return result; } } private static class sendFrontendMessage extends org.apache.thrift.ProcessFunction { public sendFrontendMessage() { super("sendFrontendMessage"); } protected sendFrontendMessage_args getEmptyArgsInstance() { return new sendFrontendMessage_args(); } protected sendFrontendMessage_result getResult(I iface, sendFrontendMessage_args args) throws org.apache.thrift.TException { sendFrontendMessage_result result = new sendFrontendMessage_result(); iface.sendFrontendMessage(args.app, args.taskId, args.status, args.message); return result; } } } public static class registerFrontend_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerFrontend_args"); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new registerFrontend_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new registerFrontend_argsTupleSchemeFactory()); } public String app; // required public String socketAddress; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { APP((short)1, "app"), SOCKET_ADDRESS((short)2, "socketAddress"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // APP return APP; case 2: // SOCKET_ADDRESS return SOCKET_ADDRESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.APP, new org.apache.thrift.meta_data.FieldMetaData("app", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.SOCKET_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("socketAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerFrontend_args.class, metaDataMap); } public registerFrontend_args() { } public registerFrontend_args( String app, String socketAddress) { this(); this.app = app; this.socketAddress = socketAddress; } /** * Performs a deep copy on other. */ public registerFrontend_args(registerFrontend_args other) { if (other.isSetApp()) { this.app = other.app; } if (other.isSetSocketAddress()) { this.socketAddress = other.socketAddress; } } public registerFrontend_args deepCopy() { return new registerFrontend_args(this); } public void clear() { this.app = null; this.socketAddress = null; } public String getApp() { return this.app; } public registerFrontend_args setApp(String app) { this.app = app; return this; } public void unsetApp() { this.app = null; } /** Returns true if field app is set (has been assigned a value) and false otherwise */ public boolean isSetApp() { return this.app != null; } public void setAppIsSet(boolean value) { if (!value) { this.app = null; } } public String getSocketAddress() { return this.socketAddress; } public registerFrontend_args setSocketAddress(String socketAddress) { this.socketAddress = socketAddress; return this; } public void unsetSocketAddress() { this.socketAddress = null; } /** Returns true if field socketAddress is set (has been assigned a value) and false otherwise */ public boolean isSetSocketAddress() { return this.socketAddress != null; } public void setSocketAddressIsSet(boolean value) { if (!value) { this.socketAddress = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case APP: if (value == null) { unsetApp(); } else { setApp((String)value); } break; case SOCKET_ADDRESS: if (value == null) { unsetSocketAddress(); } else { setSocketAddress((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case APP: return getApp(); case SOCKET_ADDRESS: return getSocketAddress(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case APP: return isSetApp(); case SOCKET_ADDRESS: return isSetSocketAddress(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof registerFrontend_args) return this.equals((registerFrontend_args)that); return false; } public boolean equals(registerFrontend_args that) { if (that == null) return false; boolean this_present_app = true && this.isSetApp(); boolean that_present_app = true && that.isSetApp(); if (this_present_app || that_present_app) { if (!(this_present_app && that_present_app)) return false; if (!this.app.equals(that.app)) return false; } boolean this_present_socketAddress = true && this.isSetSocketAddress(); boolean that_present_socketAddress = true && that.isSetSocketAddress(); if (this_present_socketAddress || that_present_socketAddress) { if (!(this_present_socketAddress && that_present_socketAddress)) return false; if (!this.socketAddress.equals(that.socketAddress)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(registerFrontend_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; registerFrontend_args typedOther = (registerFrontend_args)other; lastComparison = Boolean.valueOf(isSetApp()).compareTo(typedOther.isSetApp()); if (lastComparison != 0) { return lastComparison; } if (isSetApp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app, typedOther.app); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSocketAddress()).compareTo(typedOther.isSetSocketAddress()); if (lastComparison != 0) { return lastComparison; } if (isSetSocketAddress()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.socketAddress, typedOther.socketAddress); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("registerFrontend_args("); boolean first = true; sb.append("app:"); if (this.app == null) { sb.append("null"); } else { sb.append(this.app); } first = false; if (!first) sb.append(", "); sb.append("socketAddress:"); if (this.socketAddress == null) { sb.append("null"); } else { sb.append(this.socketAddress); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class registerFrontend_argsStandardSchemeFactory implements SchemeFactory { public registerFrontend_argsStandardScheme getScheme() { return new registerFrontend_argsStandardScheme(); } } private static class registerFrontend_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, registerFrontend_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // APP if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.app = iprot.readString(); struct.setAppIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SOCKET_ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.socketAddress = iprot.readString(); struct.setSocketAddressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, registerFrontend_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.app != null) { oprot.writeFieldBegin(APP_FIELD_DESC); oprot.writeString(struct.app); oprot.writeFieldEnd(); } if (struct.socketAddress != null) { oprot.writeFieldBegin(SOCKET_ADDRESS_FIELD_DESC); oprot.writeString(struct.socketAddress); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class registerFrontend_argsTupleSchemeFactory implements SchemeFactory { public registerFrontend_argsTupleScheme getScheme() { return new registerFrontend_argsTupleScheme(); } } private static class registerFrontend_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, registerFrontend_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetApp()) { optionals.set(0); } if (struct.isSetSocketAddress()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetApp()) { oprot.writeString(struct.app); } if (struct.isSetSocketAddress()) { oprot.writeString(struct.socketAddress); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, registerFrontend_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.app = iprot.readString(); struct.setAppIsSet(true); } if (incoming.get(1)) { struct.socketAddress = iprot.readString(); struct.setSocketAddressIsSet(true); } } } } public static class registerFrontend_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerFrontend_result"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new registerFrontend_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new registerFrontend_resultTupleSchemeFactory()); } public boolean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerFrontend_result.class, metaDataMap); } public registerFrontend_result() { } public registerFrontend_result( boolean success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public registerFrontend_result(registerFrontend_result other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.success = other.success; } public registerFrontend_result deepCopy() { return new registerFrontend_result(this); } public void clear() { setSuccessIsSet(false); this.success = false; } public boolean isSuccess() { return this.success; } public registerFrontend_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return Boolean.valueOf(isSuccess()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof registerFrontend_result) return this.equals((registerFrontend_result)that); return false; } public boolean equals(registerFrontend_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(registerFrontend_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; registerFrontend_result typedOther = (registerFrontend_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("registerFrontend_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class registerFrontend_resultStandardSchemeFactory implements SchemeFactory { public registerFrontend_resultStandardScheme getScheme() { return new registerFrontend_resultStandardScheme(); } } private static class registerFrontend_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, registerFrontend_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, registerFrontend_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class registerFrontend_resultTupleSchemeFactory implements SchemeFactory { public registerFrontend_resultTupleScheme getScheme() { return new registerFrontend_resultTupleScheme(); } } private static class registerFrontend_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, registerFrontend_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, registerFrontend_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } } } } public static class submitJob_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitJob_args"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new submitJob_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new submitJob_argsTupleSchemeFactory()); } public edu.berkeley.sparrow.thrift.TSchedulingRequest req; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { REQ((short)1, "req"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // REQ return REQ; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.REQ, new org.apache.thrift.meta_data.FieldMetaData("req", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TSchedulingRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_args.class, metaDataMap); } public submitJob_args() { } public submitJob_args( edu.berkeley.sparrow.thrift.TSchedulingRequest req) { this(); this.req = req; } /** * Performs a deep copy on other. */ public submitJob_args(submitJob_args other) { if (other.isSetReq()) { this.req = new edu.berkeley.sparrow.thrift.TSchedulingRequest(other.req); } } public submitJob_args deepCopy() { return new submitJob_args(this); } public void clear() { this.req = null; } public edu.berkeley.sparrow.thrift.TSchedulingRequest getReq() { return this.req; } public submitJob_args setReq(edu.berkeley.sparrow.thrift.TSchedulingRequest req) { this.req = req; return this; } public void unsetReq() { this.req = null; } /** Returns true if field req is set (has been assigned a value) and false otherwise */ public boolean isSetReq() { return this.req != null; } public void setReqIsSet(boolean value) { if (!value) { this.req = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQ: if (value == null) { unsetReq(); } else { setReq((edu.berkeley.sparrow.thrift.TSchedulingRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQ: return getReq(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case REQ: return isSetReq(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof submitJob_args) return this.equals((submitJob_args)that); return false; } public boolean equals(submitJob_args that) { if (that == null) return false; boolean this_present_req = true && this.isSetReq(); boolean that_present_req = true && that.isSetReq(); if (this_present_req || that_present_req) { if (!(this_present_req && that_present_req)) return false; if (!this.req.equals(that.req)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(submitJob_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; submitJob_args typedOther = (submitJob_args)other; lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("submitJob_args("); boolean first = true; sb.append("req:"); if (this.req == null) { sb.append("null"); } else { sb.append(this.req); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class submitJob_argsStandardSchemeFactory implements SchemeFactory { public submitJob_argsStandardScheme getScheme() { return new submitJob_argsStandardScheme(); } } private static class submitJob_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.req = new edu.berkeley.sparrow.thrift.TSchedulingRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, submitJob_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.req != null) { oprot.writeFieldBegin(REQ_FIELD_DESC); struct.req.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class submitJob_argsTupleSchemeFactory implements SchemeFactory { public submitJob_argsTupleScheme getScheme() { return new submitJob_argsTupleScheme(); } } private static class submitJob_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetReq()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetReq()) { struct.req.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new edu.berkeley.sparrow.thrift.TSchedulingRequest(); struct.req.read(iprot); struct.setReqIsSet(true); } } } } public static class submitJob_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitJob_result"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new submitJob_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new submitJob_resultTupleSchemeFactory()); } public edu.berkeley.sparrow.thrift.IncompleteRequestException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitJob_result.class, metaDataMap); } public submitJob_result() { } public submitJob_result( edu.berkeley.sparrow.thrift.IncompleteRequestException e) { this(); this.e = e; } /** * Performs a deep copy on other. */ public submitJob_result(submitJob_result other) { if (other.isSetE()) { this.e = new edu.berkeley.sparrow.thrift.IncompleteRequestException(other.e); } } public submitJob_result deepCopy() { return new submitJob_result(this); } public void clear() { this.e = null; } public edu.berkeley.sparrow.thrift.IncompleteRequestException getE() { return this.e; } public submitJob_result setE(edu.berkeley.sparrow.thrift.IncompleteRequestException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((edu.berkeley.sparrow.thrift.IncompleteRequestException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof submitJob_result) return this.equals((submitJob_result)that); return false; } public boolean equals(submitJob_result that) { if (that == null) return false; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(submitJob_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; submitJob_result typedOther = (submitJob_result)other; lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("submitJob_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class submitJob_resultStandardSchemeFactory implements SchemeFactory { public submitJob_resultStandardScheme getScheme() { return new submitJob_resultStandardScheme(); } } private static class submitJob_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, submitJob_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.e = new edu.berkeley.sparrow.thrift.IncompleteRequestException(); struct.e.read(iprot); struct.setEIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, submitJob_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class submitJob_resultTupleSchemeFactory implements SchemeFactory { public submitJob_resultTupleScheme getScheme() { return new submitJob_resultTupleScheme(); } } private static class submitJob_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, submitJob_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, submitJob_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new edu.berkeley.sparrow.thrift.IncompleteRequestException(); struct.e.read(iprot); struct.setEIsSet(true); } } } } public static class sendFrontendMessage_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendFrontendMessage_args"); 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); 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); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new sendFrontendMessage_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new sendFrontendMessage_argsTupleSchemeFactory()); } public String app; // required public edu.berkeley.sparrow.thrift.TFullTaskId taskId; // required public int status; // required public ByteBuffer message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { APP((short)1, "app"), TASK_ID((short)2, "taskId"), STATUS((short)3, "status"), MESSAGE((short)4, "message"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // APP return APP; case 2: // TASK_ID return TASK_ID; case 3: // STATUS return STATUS; case 4: // MESSAGE return MESSAGE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __STATUS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.APP, new org.apache.thrift.meta_data.FieldMetaData("app", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TFullTaskId.class))); tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendFrontendMessage_args.class, metaDataMap); } public sendFrontendMessage_args() { } public sendFrontendMessage_args( String app, edu.berkeley.sparrow.thrift.TFullTaskId taskId, int status, ByteBuffer message) { this(); this.app = app; this.taskId = taskId; this.status = status; setStatusIsSet(true); this.message = message; } /** * Performs a deep copy on other. */ public sendFrontendMessage_args(sendFrontendMessage_args other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetApp()) { this.app = other.app; } if (other.isSetTaskId()) { this.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(other.taskId); } this.status = other.status; if (other.isSetMessage()) { this.message = org.apache.thrift.TBaseHelper.copyBinary(other.message); ; } } public sendFrontendMessage_args deepCopy() { return new sendFrontendMessage_args(this); } public void clear() { this.app = null; this.taskId = null; setStatusIsSet(false); this.status = 0; this.message = null; } public String getApp() { return this.app; } public sendFrontendMessage_args setApp(String app) { this.app = app; return this; } public void unsetApp() { this.app = null; } /** Returns true if field app is set (has been assigned a value) and false otherwise */ public boolean isSetApp() { return this.app != null; } public void setAppIsSet(boolean value) { if (!value) { this.app = null; } } public edu.berkeley.sparrow.thrift.TFullTaskId getTaskId() { return this.taskId; } public sendFrontendMessage_args setTaskId(edu.berkeley.sparrow.thrift.TFullTaskId taskId) { this.taskId = taskId; return this; } public void unsetTaskId() { this.taskId = null; } /** Returns true if field taskId is set (has been assigned a value) and false otherwise */ public boolean isSetTaskId() { return this.taskId != null; } public void setTaskIdIsSet(boolean value) { if (!value) { this.taskId = null; } } public int getStatus() { return this.status; } public sendFrontendMessage_args setStatus(int status) { this.status = status; setStatusIsSet(true); return this; } public void unsetStatus() { __isset_bit_vector.clear(__STATUS_ISSET_ID); } /** Returns true if field status is set (has been assigned a value) and false otherwise */ public boolean isSetStatus() { return __isset_bit_vector.get(__STATUS_ISSET_ID); } public void setStatusIsSet(boolean value) { __isset_bit_vector.set(__STATUS_ISSET_ID, value); } public byte[] getMessage() { setMessage(org.apache.thrift.TBaseHelper.rightSize(message)); return message == null ? null : message.array(); } public ByteBuffer bufferForMessage() { return message; } public sendFrontendMessage_args setMessage(byte[] message) { setMessage(message == null ? (ByteBuffer)null : ByteBuffer.wrap(message)); return this; } public sendFrontendMessage_args setMessage(ByteBuffer message) { this.message = message; return this; } public void unsetMessage() { this.message = null; } /** Returns true if field message is set (has been assigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } public void setMessageIsSet(boolean value) { if (!value) { this.message = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case APP: if (value == null) { unsetApp(); } else { setApp((String)value); } break; case TASK_ID: if (value == null) { unsetTaskId(); } else { setTaskId((edu.berkeley.sparrow.thrift.TFullTaskId)value); } break; case STATUS: if (value == null) { unsetStatus(); } else { setStatus((Integer)value); } break; case MESSAGE: if (value == null) { unsetMessage(); } else { setMessage((ByteBuffer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case APP: return getApp(); case TASK_ID: return getTaskId(); case STATUS: return Integer.valueOf(getStatus()); case MESSAGE: return getMessage(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case APP: return isSetApp(); case TASK_ID: return isSetTaskId(); case STATUS: return isSetStatus(); case MESSAGE: return isSetMessage(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof sendFrontendMessage_args) return this.equals((sendFrontendMessage_args)that); return false; } public boolean equals(sendFrontendMessage_args that) { if (that == null) return false; boolean this_present_app = true && this.isSetApp(); boolean that_present_app = true && that.isSetApp(); if (this_present_app || that_present_app) { if (!(this_present_app && that_present_app)) return false; if (!this.app.equals(that.app)) return false; } boolean this_present_taskId = true && this.isSetTaskId(); boolean that_present_taskId = true && that.isSetTaskId(); if (this_present_taskId || that_present_taskId) { if (!(this_present_taskId && that_present_taskId)) return false; if (!this.taskId.equals(that.taskId)) return false; } boolean this_present_status = true; boolean that_present_status = true; if (this_present_status || that_present_status) { if (!(this_present_status && that_present_status)) return false; if (this.status != that.status) return false; } boolean this_present_message = true && this.isSetMessage(); boolean that_present_message = true && that.isSetMessage(); if (this_present_message || that_present_message) { if (!(this_present_message && that_present_message)) return false; if (!this.message.equals(that.message)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(sendFrontendMessage_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; sendFrontendMessage_args typedOther = (sendFrontendMessage_args)other; lastComparison = Boolean.valueOf(isSetApp()).compareTo(typedOther.isSetApp()); if (lastComparison != 0) { return lastComparison; } if (isSetApp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app, typedOther.app); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId()); if (lastComparison != 0) { return lastComparison; } if (isSetTaskId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, typedOther.taskId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetMessage()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("sendFrontendMessage_args("); boolean first = true; sb.append("app:"); if (this.app == null) { sb.append("null"); } else { sb.append(this.app); } first = false; if (!first) sb.append(", "); sb.append("taskId:"); if (this.taskId == null) { sb.append("null"); } else { sb.append(this.taskId); } first = false; if (!first) sb.append(", "); sb.append("status:"); sb.append(this.status); first = false; if (!first) sb.append(", "); sb.append("message:"); if (this.message == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.message, sb); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class sendFrontendMessage_argsStandardSchemeFactory implements SchemeFactory { public sendFrontendMessage_argsStandardScheme getScheme() { return new sendFrontendMessage_argsStandardScheme(); } } private static class sendFrontendMessage_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, sendFrontendMessage_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // APP if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.app = iprot.readString(); struct.setAppIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TASK_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(); struct.taskId.read(iprot); struct.setTaskIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // STATUS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.status = iprot.readI32(); struct.setStatusIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // MESSAGE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.message = iprot.readBinary(); struct.setMessageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, sendFrontendMessage_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.app != null) { oprot.writeFieldBegin(APP_FIELD_DESC); oprot.writeString(struct.app); oprot.writeFieldEnd(); } if (struct.taskId != null) { oprot.writeFieldBegin(TASK_ID_FIELD_DESC); struct.taskId.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(STATUS_FIELD_DESC); oprot.writeI32(struct.status); oprot.writeFieldEnd(); if (struct.message != null) { oprot.writeFieldBegin(MESSAGE_FIELD_DESC); oprot.writeBinary(struct.message); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class sendFrontendMessage_argsTupleSchemeFactory implements SchemeFactory { public sendFrontendMessage_argsTupleScheme getScheme() { return new sendFrontendMessage_argsTupleScheme(); } } private static class sendFrontendMessage_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetApp()) { optionals.set(0); } if (struct.isSetTaskId()) { optionals.set(1); } if (struct.isSetStatus()) { optionals.set(2); } if (struct.isSetMessage()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetApp()) { oprot.writeString(struct.app); } if (struct.isSetTaskId()) { struct.taskId.write(oprot); } if (struct.isSetStatus()) { oprot.writeI32(struct.status); } if (struct.isSetMessage()) { oprot.writeBinary(struct.message); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.app = iprot.readString(); struct.setAppIsSet(true); } if (incoming.get(1)) { struct.taskId = new edu.berkeley.sparrow.thrift.TFullTaskId(); struct.taskId.read(iprot); struct.setTaskIdIsSet(true); } if (incoming.get(2)) { struct.status = iprot.readI32(); struct.setStatusIsSet(true); } if (incoming.get(3)) { struct.message = iprot.readBinary(); struct.setMessageIsSet(true); } } } } public static class sendFrontendMessage_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sendFrontendMessage_result"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new sendFrontendMessage_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new sendFrontendMessage_resultTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendFrontendMessage_result.class, metaDataMap); } public sendFrontendMessage_result() { } /** * Performs a deep copy on other. */ public sendFrontendMessage_result(sendFrontendMessage_result other) { } public sendFrontendMessage_result deepCopy() { return new sendFrontendMessage_result(this); } public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof sendFrontendMessage_result) return this.equals((sendFrontendMessage_result)that); return false; } public boolean equals(sendFrontendMessage_result that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(sendFrontendMessage_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; sendFrontendMessage_result typedOther = (sendFrontendMessage_result)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("sendFrontendMessage_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class sendFrontendMessage_resultStandardSchemeFactory implements SchemeFactory { public sendFrontendMessage_resultStandardScheme getScheme() { return new sendFrontendMessage_resultStandardScheme(); } } private static class sendFrontendMessage_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, sendFrontendMessage_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, sendFrontendMessage_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class sendFrontendMessage_resultTupleSchemeFactory implements SchemeFactory { public sendFrontendMessage_resultTupleScheme getScheme() { return new sendFrontendMessage_resultTupleScheme(); } } private static class sendFrontendMessage_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, sendFrontendMessage_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/SchedulerStateStoreService.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class SchedulerStateStoreService { public interface Iface { public void updateNodeState(Map snapshot) throws org.apache.thrift.TException; } public interface AsyncIface { public void updateNodeState(Map snapshot, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public void updateNodeState(Map snapshot) throws org.apache.thrift.TException { send_updateNodeState(snapshot); recv_updateNodeState(); } public void send_updateNodeState(Map snapshot) throws org.apache.thrift.TException { updateNodeState_args args = new updateNodeState_args(); args.setSnapshot(snapshot); sendBase("updateNodeState", args); } public void recv_updateNodeState() throws org.apache.thrift.TException { updateNodeState_result result = new updateNodeState_result(); receiveBase(result, "updateNodeState"); return; } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void updateNodeState(Map snapshot, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); updateNodeState_call method_call = new updateNodeState_call(snapshot, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class updateNodeState_call extends org.apache.thrift.async.TAsyncMethodCall { private Map snapshot; public updateNodeState_call(Map snapshot, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.snapshot = snapshot; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateNodeState", org.apache.thrift.protocol.TMessageType.CALL, 0)); updateNodeState_args args = new updateNodeState_args(); args.setSnapshot(snapshot); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_updateNodeState(); } } } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap>())); } protected Processor(I iface, Map> processMap) { super(iface, getProcessMap(processMap)); } private static Map> getProcessMap(Map> processMap) { processMap.put("updateNodeState", new updateNodeState()); return processMap; } private static class updateNodeState extends org.apache.thrift.ProcessFunction { public updateNodeState() { super("updateNodeState"); } protected updateNodeState_args getEmptyArgsInstance() { return new updateNodeState_args(); } protected updateNodeState_result getResult(I iface, updateNodeState_args args) throws org.apache.thrift.TException { updateNodeState_result result = new updateNodeState_result(); iface.updateNodeState(args.snapshot); return result; } } } public static class updateNodeState_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateNodeState_args"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new updateNodeState_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new updateNodeState_argsTupleSchemeFactory()); } public Map snapshot; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SNAPSHOT((short)1, "snapshot"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SNAPSHOT return SNAPSHOT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SNAPSHOT, new org.apache.thrift.meta_data.FieldMetaData("snapshot", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, edu.berkeley.sparrow.thrift.TNodeState.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateNodeState_args.class, metaDataMap); } public updateNodeState_args() { } public updateNodeState_args( Map snapshot) { this(); this.snapshot = snapshot; } /** * Performs a deep copy on other. */ public updateNodeState_args(updateNodeState_args other) { if (other.isSetSnapshot()) { Map __this__snapshot = new HashMap(); for (Map.Entry other_element : other.snapshot.entrySet()) { String other_element_key = other_element.getKey(); edu.berkeley.sparrow.thrift.TNodeState other_element_value = other_element.getValue(); String __this__snapshot_copy_key = other_element_key; edu.berkeley.sparrow.thrift.TNodeState __this__snapshot_copy_value = new edu.berkeley.sparrow.thrift.TNodeState(other_element_value); __this__snapshot.put(__this__snapshot_copy_key, __this__snapshot_copy_value); } this.snapshot = __this__snapshot; } } public updateNodeState_args deepCopy() { return new updateNodeState_args(this); } public void clear() { this.snapshot = null; } public int getSnapshotSize() { return (this.snapshot == null) ? 0 : this.snapshot.size(); } public void putToSnapshot(String key, edu.berkeley.sparrow.thrift.TNodeState val) { if (this.snapshot == null) { this.snapshot = new HashMap(); } this.snapshot.put(key, val); } public Map getSnapshot() { return this.snapshot; } public updateNodeState_args setSnapshot(Map snapshot) { this.snapshot = snapshot; return this; } public void unsetSnapshot() { this.snapshot = null; } /** Returns true if field snapshot is set (has been assigned a value) and false otherwise */ public boolean isSetSnapshot() { return this.snapshot != null; } public void setSnapshotIsSet(boolean value) { if (!value) { this.snapshot = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SNAPSHOT: if (value == null) { unsetSnapshot(); } else { setSnapshot((Map)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SNAPSHOT: return getSnapshot(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SNAPSHOT: return isSetSnapshot(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof updateNodeState_args) return this.equals((updateNodeState_args)that); return false; } public boolean equals(updateNodeState_args that) { if (that == null) return false; boolean this_present_snapshot = true && this.isSetSnapshot(); boolean that_present_snapshot = true && that.isSetSnapshot(); if (this_present_snapshot || that_present_snapshot) { if (!(this_present_snapshot && that_present_snapshot)) return false; if (!this.snapshot.equals(that.snapshot)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(updateNodeState_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; updateNodeState_args typedOther = (updateNodeState_args)other; lastComparison = Boolean.valueOf(isSetSnapshot()).compareTo(typedOther.isSetSnapshot()); if (lastComparison != 0) { return lastComparison; } if (isSetSnapshot()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.snapshot, typedOther.snapshot); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("updateNodeState_args("); boolean first = true; sb.append("snapshot:"); if (this.snapshot == null) { sb.append("null"); } else { sb.append(this.snapshot); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class updateNodeState_argsStandardSchemeFactory implements SchemeFactory { public updateNodeState_argsStandardScheme getScheme() { return new updateNodeState_argsStandardScheme(); } } private static class updateNodeState_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, updateNodeState_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SNAPSHOT if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin(); struct.snapshot = new HashMap(2*_map16.size); for (int _i17 = 0; _i17 < _map16.size; ++_i17) { String _key18; // required edu.berkeley.sparrow.thrift.TNodeState _val19; // required _key18 = iprot.readString(); _val19 = new edu.berkeley.sparrow.thrift.TNodeState(); _val19.read(iprot); struct.snapshot.put(_key18, _val19); } iprot.readMapEnd(); } struct.setSnapshotIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, updateNodeState_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.snapshot != null) { oprot.writeFieldBegin(SNAPSHOT_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.snapshot.size())); for (Map.Entry _iter20 : struct.snapshot.entrySet()) { oprot.writeString(_iter20.getKey()); _iter20.getValue().write(oprot); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class updateNodeState_argsTupleSchemeFactory implements SchemeFactory { public updateNodeState_argsTupleScheme getScheme() { return new updateNodeState_argsTupleScheme(); } } private static class updateNodeState_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateNodeState_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSnapshot()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSnapshot()) { { oprot.writeI32(struct.snapshot.size()); for (Map.Entry _iter21 : struct.snapshot.entrySet()) { oprot.writeString(_iter21.getKey()); _iter21.getValue().write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, updateNodeState_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { 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()); struct.snapshot = new HashMap(2*_map22.size); for (int _i23 = 0; _i23 < _map22.size; ++_i23) { String _key24; // required edu.berkeley.sparrow.thrift.TNodeState _val25; // required _key24 = iprot.readString(); _val25 = new edu.berkeley.sparrow.thrift.TNodeState(); _val25.read(iprot); struct.snapshot.put(_key24, _val25); } } struct.setSnapshotIsSet(true); } } } } public static class updateNodeState_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateNodeState_result"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new updateNodeState_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new updateNodeState_resultTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateNodeState_result.class, metaDataMap); } public updateNodeState_result() { } /** * Performs a deep copy on other. */ public updateNodeState_result(updateNodeState_result other) { } public updateNodeState_result deepCopy() { return new updateNodeState_result(this); } public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof updateNodeState_result) return this.equals((updateNodeState_result)that); return false; } public boolean equals(updateNodeState_result that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(updateNodeState_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; updateNodeState_result typedOther = (updateNodeState_result)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("updateNodeState_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class updateNodeState_resultStandardSchemeFactory implements SchemeFactory { public updateNodeState_resultStandardScheme getScheme() { return new updateNodeState_resultStandardScheme(); } } private static class updateNodeState_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, updateNodeState_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, updateNodeState_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class updateNodeState_resultTupleSchemeFactory implements SchemeFactory { public updateNodeState_resultTupleScheme getScheme() { return new updateNodeState_resultTupleScheme(); } } private static class updateNodeState_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateNodeState_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, updateNodeState_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/StateStoreService.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class StateStoreService { public interface Iface { public void registerScheduler(String schedulerAddress) throws org.apache.thrift.TException; public void registerNodeMonitor(String nodeMonitorAddress) throws org.apache.thrift.TException; } public interface AsyncIface { public void registerScheduler(String schedulerAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void registerNodeMonitor(String nodeMonitorAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public void registerScheduler(String schedulerAddress) throws org.apache.thrift.TException { send_registerScheduler(schedulerAddress); recv_registerScheduler(); } public void send_registerScheduler(String schedulerAddress) throws org.apache.thrift.TException { registerScheduler_args args = new registerScheduler_args(); args.setSchedulerAddress(schedulerAddress); sendBase("registerScheduler", args); } public void recv_registerScheduler() throws org.apache.thrift.TException { registerScheduler_result result = new registerScheduler_result(); receiveBase(result, "registerScheduler"); return; } public void registerNodeMonitor(String nodeMonitorAddress) throws org.apache.thrift.TException { send_registerNodeMonitor(nodeMonitorAddress); recv_registerNodeMonitor(); } public void send_registerNodeMonitor(String nodeMonitorAddress) throws org.apache.thrift.TException { registerNodeMonitor_args args = new registerNodeMonitor_args(); args.setNodeMonitorAddress(nodeMonitorAddress); sendBase("registerNodeMonitor", args); } public void recv_registerNodeMonitor() throws org.apache.thrift.TException { registerNodeMonitor_result result = new registerNodeMonitor_result(); receiveBase(result, "registerNodeMonitor"); return; } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void registerScheduler(String schedulerAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); registerScheduler_call method_call = new registerScheduler_call(schedulerAddress, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class registerScheduler_call extends org.apache.thrift.async.TAsyncMethodCall { private String schedulerAddress; public registerScheduler_call(String schedulerAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.schedulerAddress = schedulerAddress; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerScheduler", org.apache.thrift.protocol.TMessageType.CALL, 0)); registerScheduler_args args = new registerScheduler_args(); args.setSchedulerAddress(schedulerAddress); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_registerScheduler(); } } public void registerNodeMonitor(String nodeMonitorAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); registerNodeMonitor_call method_call = new registerNodeMonitor_call(nodeMonitorAddress, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class registerNodeMonitor_call extends org.apache.thrift.async.TAsyncMethodCall { private String nodeMonitorAddress; public registerNodeMonitor_call(String nodeMonitorAddress, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.nodeMonitorAddress = nodeMonitorAddress; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerNodeMonitor", org.apache.thrift.protocol.TMessageType.CALL, 0)); registerNodeMonitor_args args = new registerNodeMonitor_args(); args.setNodeMonitorAddress(nodeMonitorAddress); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_registerNodeMonitor(); } } } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap>())); } protected Processor(I iface, Map> processMap) { super(iface, getProcessMap(processMap)); } private static Map> getProcessMap(Map> processMap) { processMap.put("registerScheduler", new registerScheduler()); processMap.put("registerNodeMonitor", new registerNodeMonitor()); return processMap; } private static class registerScheduler extends org.apache.thrift.ProcessFunction { public registerScheduler() { super("registerScheduler"); } protected registerScheduler_args getEmptyArgsInstance() { return new registerScheduler_args(); } protected registerScheduler_result getResult(I iface, registerScheduler_args args) throws org.apache.thrift.TException { registerScheduler_result result = new registerScheduler_result(); iface.registerScheduler(args.schedulerAddress); return result; } } private static class registerNodeMonitor extends org.apache.thrift.ProcessFunction { public registerNodeMonitor() { super("registerNodeMonitor"); } protected registerNodeMonitor_args getEmptyArgsInstance() { return new registerNodeMonitor_args(); } protected registerNodeMonitor_result getResult(I iface, registerNodeMonitor_args args) throws org.apache.thrift.TException { registerNodeMonitor_result result = new registerNodeMonitor_result(); iface.registerNodeMonitor(args.nodeMonitorAddress); return result; } } } public static class registerScheduler_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerScheduler_args"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new registerScheduler_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new registerScheduler_argsTupleSchemeFactory()); } public String schedulerAddress; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SCHEDULER_ADDRESS((short)1, "schedulerAddress"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SCHEDULER_ADDRESS return SCHEDULER_ADDRESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SCHEDULER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("schedulerAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerScheduler_args.class, metaDataMap); } public registerScheduler_args() { } public registerScheduler_args( String schedulerAddress) { this(); this.schedulerAddress = schedulerAddress; } /** * Performs a deep copy on other. */ public registerScheduler_args(registerScheduler_args other) { if (other.isSetSchedulerAddress()) { this.schedulerAddress = other.schedulerAddress; } } public registerScheduler_args deepCopy() { return new registerScheduler_args(this); } public void clear() { this.schedulerAddress = null; } public String getSchedulerAddress() { return this.schedulerAddress; } public registerScheduler_args setSchedulerAddress(String schedulerAddress) { this.schedulerAddress = schedulerAddress; return this; } public void unsetSchedulerAddress() { this.schedulerAddress = null; } /** Returns true if field schedulerAddress is set (has been assigned a value) and false otherwise */ public boolean isSetSchedulerAddress() { return this.schedulerAddress != null; } public void setSchedulerAddressIsSet(boolean value) { if (!value) { this.schedulerAddress = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SCHEDULER_ADDRESS: if (value == null) { unsetSchedulerAddress(); } else { setSchedulerAddress((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SCHEDULER_ADDRESS: return getSchedulerAddress(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SCHEDULER_ADDRESS: return isSetSchedulerAddress(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof registerScheduler_args) return this.equals((registerScheduler_args)that); return false; } public boolean equals(registerScheduler_args that) { if (that == null) return false; boolean this_present_schedulerAddress = true && this.isSetSchedulerAddress(); boolean that_present_schedulerAddress = true && that.isSetSchedulerAddress(); if (this_present_schedulerAddress || that_present_schedulerAddress) { if (!(this_present_schedulerAddress && that_present_schedulerAddress)) return false; if (!this.schedulerAddress.equals(that.schedulerAddress)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(registerScheduler_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; registerScheduler_args typedOther = (registerScheduler_args)other; lastComparison = Boolean.valueOf(isSetSchedulerAddress()).compareTo(typedOther.isSetSchedulerAddress()); if (lastComparison != 0) { return lastComparison; } if (isSetSchedulerAddress()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schedulerAddress, typedOther.schedulerAddress); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("registerScheduler_args("); boolean first = true; sb.append("schedulerAddress:"); if (this.schedulerAddress == null) { sb.append("null"); } else { sb.append(this.schedulerAddress); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class registerScheduler_argsStandardSchemeFactory implements SchemeFactory { public registerScheduler_argsStandardScheme getScheme() { return new registerScheduler_argsStandardScheme(); } } private static class registerScheduler_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, registerScheduler_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SCHEDULER_ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.schedulerAddress = iprot.readString(); struct.setSchedulerAddressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, registerScheduler_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.schedulerAddress != null) { oprot.writeFieldBegin(SCHEDULER_ADDRESS_FIELD_DESC); oprot.writeString(struct.schedulerAddress); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class registerScheduler_argsTupleSchemeFactory implements SchemeFactory { public registerScheduler_argsTupleScheme getScheme() { return new registerScheduler_argsTupleScheme(); } } private static class registerScheduler_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, registerScheduler_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSchedulerAddress()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSchedulerAddress()) { oprot.writeString(struct.schedulerAddress); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, registerScheduler_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.schedulerAddress = iprot.readString(); struct.setSchedulerAddressIsSet(true); } } } } public static class registerScheduler_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerScheduler_result"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new registerScheduler_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new registerScheduler_resultTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerScheduler_result.class, metaDataMap); } public registerScheduler_result() { } /** * Performs a deep copy on other. */ public registerScheduler_result(registerScheduler_result other) { } public registerScheduler_result deepCopy() { return new registerScheduler_result(this); } public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof registerScheduler_result) return this.equals((registerScheduler_result)that); return false; } public boolean equals(registerScheduler_result that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(registerScheduler_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; registerScheduler_result typedOther = (registerScheduler_result)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("registerScheduler_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class registerScheduler_resultStandardSchemeFactory implements SchemeFactory { public registerScheduler_resultStandardScheme getScheme() { return new registerScheduler_resultStandardScheme(); } } private static class registerScheduler_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, registerScheduler_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, registerScheduler_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class registerScheduler_resultTupleSchemeFactory implements SchemeFactory { public registerScheduler_resultTupleScheme getScheme() { return new registerScheduler_resultTupleScheme(); } } private static class registerScheduler_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, registerScheduler_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, registerScheduler_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class registerNodeMonitor_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerNodeMonitor_args"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new registerNodeMonitor_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new registerNodeMonitor_argsTupleSchemeFactory()); } public String nodeMonitorAddress; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { NODE_MONITOR_ADDRESS((short)1, "nodeMonitorAddress"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // NODE_MONITOR_ADDRESS return NODE_MONITOR_ADDRESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.NODE_MONITOR_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("nodeMonitorAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerNodeMonitor_args.class, metaDataMap); } public registerNodeMonitor_args() { } public registerNodeMonitor_args( String nodeMonitorAddress) { this(); this.nodeMonitorAddress = nodeMonitorAddress; } /** * Performs a deep copy on other. */ public registerNodeMonitor_args(registerNodeMonitor_args other) { if (other.isSetNodeMonitorAddress()) { this.nodeMonitorAddress = other.nodeMonitorAddress; } } public registerNodeMonitor_args deepCopy() { return new registerNodeMonitor_args(this); } public void clear() { this.nodeMonitorAddress = null; } public String getNodeMonitorAddress() { return this.nodeMonitorAddress; } public registerNodeMonitor_args setNodeMonitorAddress(String nodeMonitorAddress) { this.nodeMonitorAddress = nodeMonitorAddress; return this; } public void unsetNodeMonitorAddress() { this.nodeMonitorAddress = null; } /** Returns true if field nodeMonitorAddress is set (has been assigned a value) and false otherwise */ public boolean isSetNodeMonitorAddress() { return this.nodeMonitorAddress != null; } public void setNodeMonitorAddressIsSet(boolean value) { if (!value) { this.nodeMonitorAddress = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case NODE_MONITOR_ADDRESS: if (value == null) { unsetNodeMonitorAddress(); } else { setNodeMonitorAddress((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case NODE_MONITOR_ADDRESS: return getNodeMonitorAddress(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case NODE_MONITOR_ADDRESS: return isSetNodeMonitorAddress(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof registerNodeMonitor_args) return this.equals((registerNodeMonitor_args)that); return false; } public boolean equals(registerNodeMonitor_args that) { if (that == null) return false; boolean this_present_nodeMonitorAddress = true && this.isSetNodeMonitorAddress(); boolean that_present_nodeMonitorAddress = true && that.isSetNodeMonitorAddress(); if (this_present_nodeMonitorAddress || that_present_nodeMonitorAddress) { if (!(this_present_nodeMonitorAddress && that_present_nodeMonitorAddress)) return false; if (!this.nodeMonitorAddress.equals(that.nodeMonitorAddress)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(registerNodeMonitor_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; registerNodeMonitor_args typedOther = (registerNodeMonitor_args)other; lastComparison = Boolean.valueOf(isSetNodeMonitorAddress()).compareTo(typedOther.isSetNodeMonitorAddress()); if (lastComparison != 0) { return lastComparison; } if (isSetNodeMonitorAddress()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeMonitorAddress, typedOther.nodeMonitorAddress); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("registerNodeMonitor_args("); boolean first = true; sb.append("nodeMonitorAddress:"); if (this.nodeMonitorAddress == null) { sb.append("null"); } else { sb.append(this.nodeMonitorAddress); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class registerNodeMonitor_argsStandardSchemeFactory implements SchemeFactory { public registerNodeMonitor_argsStandardScheme getScheme() { return new registerNodeMonitor_argsStandardScheme(); } } private static class registerNodeMonitor_argsStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, registerNodeMonitor_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // NODE_MONITOR_ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.nodeMonitorAddress = iprot.readString(); struct.setNodeMonitorAddressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, registerNodeMonitor_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.nodeMonitorAddress != null) { oprot.writeFieldBegin(NODE_MONITOR_ADDRESS_FIELD_DESC); oprot.writeString(struct.nodeMonitorAddress); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class registerNodeMonitor_argsTupleSchemeFactory implements SchemeFactory { public registerNodeMonitor_argsTupleScheme getScheme() { return new registerNodeMonitor_argsTupleScheme(); } } private static class registerNodeMonitor_argsTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, registerNodeMonitor_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetNodeMonitorAddress()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetNodeMonitorAddress()) { oprot.writeString(struct.nodeMonitorAddress); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, registerNodeMonitor_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.nodeMonitorAddress = iprot.readString(); struct.setNodeMonitorAddressIsSet(true); } } } } public static class registerNodeMonitor_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerNodeMonitor_result"); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new registerNodeMonitor_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new registerNodeMonitor_resultTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerNodeMonitor_result.class, metaDataMap); } public registerNodeMonitor_result() { } /** * Performs a deep copy on other. */ public registerNodeMonitor_result(registerNodeMonitor_result other) { } public registerNodeMonitor_result deepCopy() { return new registerNodeMonitor_result(this); } public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof registerNodeMonitor_result) return this.equals((registerNodeMonitor_result)that); return false; } public boolean equals(registerNodeMonitor_result that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(registerNodeMonitor_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; registerNodeMonitor_result typedOther = (registerNodeMonitor_result)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("registerNodeMonitor_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class registerNodeMonitor_resultStandardSchemeFactory implements SchemeFactory { public registerNodeMonitor_resultStandardScheme getScheme() { return new registerNodeMonitor_resultStandardScheme(); } } private static class registerNodeMonitor_resultStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, registerNodeMonitor_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, registerNodeMonitor_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class registerNodeMonitor_resultTupleSchemeFactory implements SchemeFactory { public registerNodeMonitor_resultTupleScheme getScheme() { return new registerNodeMonitor_resultTupleScheme(); } } private static class registerNodeMonitor_resultTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, registerNodeMonitor_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, registerNodeMonitor_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/TCancelTaskReservationsRequest.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TCancelTaskReservationsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCancelTaskReservationsRequest"); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new TCancelTaskReservationsRequestStandardSchemeFactory()); schemes.put(TupleScheme.class, new TCancelTaskReservationsRequestTupleSchemeFactory()); } public String requestId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { REQUEST_ID((short)1, "requestId"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // REQUEST_ID return REQUEST_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.REQUEST_ID, new org.apache.thrift.meta_data.FieldMetaData("requestId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCancelTaskReservationsRequest.class, metaDataMap); } public TCancelTaskReservationsRequest() { } public TCancelTaskReservationsRequest( String requestId) { this(); this.requestId = requestId; } /** * Performs a deep copy on other. */ public TCancelTaskReservationsRequest(TCancelTaskReservationsRequest other) { if (other.isSetRequestId()) { this.requestId = other.requestId; } } public TCancelTaskReservationsRequest deepCopy() { return new TCancelTaskReservationsRequest(this); } public void clear() { this.requestId = null; } public String getRequestId() { return this.requestId; } public TCancelTaskReservationsRequest setRequestId(String requestId) { this.requestId = requestId; return this; } public void unsetRequestId() { this.requestId = null; } /** Returns true if field requestId is set (has been assigned a value) and false otherwise */ public boolean isSetRequestId() { return this.requestId != null; } public void setRequestIdIsSet(boolean value) { if (!value) { this.requestId = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case REQUEST_ID: if (value == null) { unsetRequestId(); } else { setRequestId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case REQUEST_ID: return getRequestId(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case REQUEST_ID: return isSetRequestId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TCancelTaskReservationsRequest) return this.equals((TCancelTaskReservationsRequest)that); return false; } public boolean equals(TCancelTaskReservationsRequest that) { if (that == null) return false; boolean this_present_requestId = true && this.isSetRequestId(); boolean that_present_requestId = true && that.isSetRequestId(); if (this_present_requestId || that_present_requestId) { if (!(this_present_requestId && that_present_requestId)) return false; if (!this.requestId.equals(that.requestId)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(TCancelTaskReservationsRequest other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; TCancelTaskReservationsRequest typedOther = (TCancelTaskReservationsRequest)other; lastComparison = Boolean.valueOf(isSetRequestId()).compareTo(typedOther.isSetRequestId()); if (lastComparison != 0) { return lastComparison; } if (isSetRequestId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestId, typedOther.requestId); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("TCancelTaskReservationsRequest("); boolean first = true; sb.append("requestId:"); if (this.requestId == null) { sb.append("null"); } else { sb.append(this.requestId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class TCancelTaskReservationsRequestStandardSchemeFactory implements SchemeFactory { public TCancelTaskReservationsRequestStandardScheme getScheme() { return new TCancelTaskReservationsRequestStandardScheme(); } } private static class TCancelTaskReservationsRequestStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, TCancelTaskReservationsRequest struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // REQUEST_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.requestId = iprot.readString(); struct.setRequestIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TCancelTaskReservationsRequest struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.requestId != null) { oprot.writeFieldBegin(REQUEST_ID_FIELD_DESC); oprot.writeString(struct.requestId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TCancelTaskReservationsRequestTupleSchemeFactory implements SchemeFactory { public TCancelTaskReservationsRequestTupleScheme getScheme() { return new TCancelTaskReservationsRequestTupleScheme(); } } private static class TCancelTaskReservationsRequestTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TCancelTaskReservationsRequest struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRequestId()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetRequestId()) { oprot.writeString(struct.requestId); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TCancelTaskReservationsRequest struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.requestId = iprot.readString(); struct.setRequestIdIsSet(true); } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/TEnqueueTaskReservationsRequest.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TEnqueueTaskReservationsRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TEnqueueTaskReservationsRequest"); 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); 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); 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); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new TEnqueueTaskReservationsRequestStandardSchemeFactory()); schemes.put(TupleScheme.class, new TEnqueueTaskReservationsRequestTupleSchemeFactory()); } public String appId; // required public TUserGroupInfo user; // required public String requestId; // required public THostPort schedulerAddress; // required public int numTasks; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { APP_ID((short)1, "appId"), USER((short)2, "user"), REQUEST_ID((short)3, "requestId"), SCHEDULER_ADDRESS((short)4, "schedulerAddress"), NUM_TASKS((short)5, "numTasks"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // APP_ID return APP_ID; case 2: // USER return USER; case 3: // REQUEST_ID return REQUEST_ID; case 4: // SCHEDULER_ADDRESS return SCHEDULER_ADDRESS; case 5: // NUM_TASKS return NUM_TASKS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __NUMTASKS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.APP_ID, new org.apache.thrift.meta_data.FieldMetaData("appId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TUserGroupInfo.class))); tmpMap.put(_Fields.REQUEST_ID, new org.apache.thrift.meta_data.FieldMetaData("requestId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.SCHEDULER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("schedulerAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THostPort.class))); tmpMap.put(_Fields.NUM_TASKS, new org.apache.thrift.meta_data.FieldMetaData("numTasks", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TEnqueueTaskReservationsRequest.class, metaDataMap); } public TEnqueueTaskReservationsRequest() { } public TEnqueueTaskReservationsRequest( String appId, TUserGroupInfo user, String requestId, THostPort schedulerAddress, int numTasks) { this(); this.appId = appId; this.user = user; this.requestId = requestId; this.schedulerAddress = schedulerAddress; this.numTasks = numTasks; setNumTasksIsSet(true); } /** * Performs a deep copy on other. */ public TEnqueueTaskReservationsRequest(TEnqueueTaskReservationsRequest other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetAppId()) { this.appId = other.appId; } if (other.isSetUser()) { this.user = new TUserGroupInfo(other.user); } if (other.isSetRequestId()) { this.requestId = other.requestId; } if (other.isSetSchedulerAddress()) { this.schedulerAddress = new THostPort(other.schedulerAddress); } this.numTasks = other.numTasks; } public TEnqueueTaskReservationsRequest deepCopy() { return new TEnqueueTaskReservationsRequest(this); } public void clear() { this.appId = null; this.user = null; this.requestId = null; this.schedulerAddress = null; setNumTasksIsSet(false); this.numTasks = 0; } public String getAppId() { return this.appId; } public TEnqueueTaskReservationsRequest setAppId(String appId) { this.appId = appId; return this; } public void unsetAppId() { this.appId = null; } /** Returns true if field appId is set (has been assigned a value) and false otherwise */ public boolean isSetAppId() { return this.appId != null; } public void setAppIdIsSet(boolean value) { if (!value) { this.appId = null; } } public TUserGroupInfo getUser() { return this.user; } public TEnqueueTaskReservationsRequest setUser(TUserGroupInfo user) { this.user = user; return this; } public void unsetUser() { this.user = null; } /** Returns true if field user is set (has been assigned a value) and false otherwise */ public boolean isSetUser() { return this.user != null; } public void setUserIsSet(boolean value) { if (!value) { this.user = null; } } public String getRequestId() { return this.requestId; } public TEnqueueTaskReservationsRequest setRequestId(String requestId) { this.requestId = requestId; return this; } public void unsetRequestId() { this.requestId = null; } /** Returns true if field requestId is set (has been assigned a value) and false otherwise */ public boolean isSetRequestId() { return this.requestId != null; } public void setRequestIdIsSet(boolean value) { if (!value) { this.requestId = null; } } public THostPort getSchedulerAddress() { return this.schedulerAddress; } public TEnqueueTaskReservationsRequest setSchedulerAddress(THostPort schedulerAddress) { this.schedulerAddress = schedulerAddress; return this; } public void unsetSchedulerAddress() { this.schedulerAddress = null; } /** Returns true if field schedulerAddress is set (has been assigned a value) and false otherwise */ public boolean isSetSchedulerAddress() { return this.schedulerAddress != null; } public void setSchedulerAddressIsSet(boolean value) { if (!value) { this.schedulerAddress = null; } } public int getNumTasks() { return this.numTasks; } public TEnqueueTaskReservationsRequest setNumTasks(int numTasks) { this.numTasks = numTasks; setNumTasksIsSet(true); return this; } public void unsetNumTasks() { __isset_bit_vector.clear(__NUMTASKS_ISSET_ID); } /** Returns true if field numTasks is set (has been assigned a value) and false otherwise */ public boolean isSetNumTasks() { return __isset_bit_vector.get(__NUMTASKS_ISSET_ID); } public void setNumTasksIsSet(boolean value) { __isset_bit_vector.set(__NUMTASKS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case APP_ID: if (value == null) { unsetAppId(); } else { setAppId((String)value); } break; case USER: if (value == null) { unsetUser(); } else { setUser((TUserGroupInfo)value); } break; case REQUEST_ID: if (value == null) { unsetRequestId(); } else { setRequestId((String)value); } break; case SCHEDULER_ADDRESS: if (value == null) { unsetSchedulerAddress(); } else { setSchedulerAddress((THostPort)value); } break; case NUM_TASKS: if (value == null) { unsetNumTasks(); } else { setNumTasks((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case APP_ID: return getAppId(); case USER: return getUser(); case REQUEST_ID: return getRequestId(); case SCHEDULER_ADDRESS: return getSchedulerAddress(); case NUM_TASKS: return Integer.valueOf(getNumTasks()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case APP_ID: return isSetAppId(); case USER: return isSetUser(); case REQUEST_ID: return isSetRequestId(); case SCHEDULER_ADDRESS: return isSetSchedulerAddress(); case NUM_TASKS: return isSetNumTasks(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TEnqueueTaskReservationsRequest) return this.equals((TEnqueueTaskReservationsRequest)that); return false; } public boolean equals(TEnqueueTaskReservationsRequest that) { if (that == null) return false; boolean this_present_appId = true && this.isSetAppId(); boolean that_present_appId = true && that.isSetAppId(); if (this_present_appId || that_present_appId) { if (!(this_present_appId && that_present_appId)) return false; if (!this.appId.equals(that.appId)) return false; } boolean this_present_user = true && this.isSetUser(); boolean that_present_user = true && that.isSetUser(); if (this_present_user || that_present_user) { if (!(this_present_user && that_present_user)) return false; if (!this.user.equals(that.user)) return false; } boolean this_present_requestId = true && this.isSetRequestId(); boolean that_present_requestId = true && that.isSetRequestId(); if (this_present_requestId || that_present_requestId) { if (!(this_present_requestId && that_present_requestId)) return false; if (!this.requestId.equals(that.requestId)) return false; } boolean this_present_schedulerAddress = true && this.isSetSchedulerAddress(); boolean that_present_schedulerAddress = true && that.isSetSchedulerAddress(); if (this_present_schedulerAddress || that_present_schedulerAddress) { if (!(this_present_schedulerAddress && that_present_schedulerAddress)) return false; if (!this.schedulerAddress.equals(that.schedulerAddress)) return false; } boolean this_present_numTasks = true; boolean that_present_numTasks = true; if (this_present_numTasks || that_present_numTasks) { if (!(this_present_numTasks && that_present_numTasks)) return false; if (this.numTasks != that.numTasks) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(TEnqueueTaskReservationsRequest other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; TEnqueueTaskReservationsRequest typedOther = (TEnqueueTaskReservationsRequest)other; lastComparison = Boolean.valueOf(isSetAppId()).compareTo(typedOther.isSetAppId()); if (lastComparison != 0) { return lastComparison; } if (isSetAppId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.appId, typedOther.appId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser()); if (lastComparison != 0) { return lastComparison; } if (isSetUser()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, typedOther.user); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRequestId()).compareTo(typedOther.isSetRequestId()); if (lastComparison != 0) { return lastComparison; } if (isSetRequestId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestId, typedOther.requestId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSchedulerAddress()).compareTo(typedOther.isSetSchedulerAddress()); if (lastComparison != 0) { return lastComparison; } if (isSetSchedulerAddress()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schedulerAddress, typedOther.schedulerAddress); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNumTasks()).compareTo(typedOther.isSetNumTasks()); if (lastComparison != 0) { return lastComparison; } if (isSetNumTasks()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numTasks, typedOther.numTasks); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("TEnqueueTaskReservationsRequest("); boolean first = true; sb.append("appId:"); if (this.appId == null) { sb.append("null"); } else { sb.append(this.appId); } first = false; if (!first) sb.append(", "); sb.append("user:"); if (this.user == null) { sb.append("null"); } else { sb.append(this.user); } first = false; if (!first) sb.append(", "); sb.append("requestId:"); if (this.requestId == null) { sb.append("null"); } else { sb.append(this.requestId); } first = false; if (!first) sb.append(", "); sb.append("schedulerAddress:"); if (this.schedulerAddress == null) { sb.append("null"); } else { sb.append(this.schedulerAddress); } first = false; if (!first) sb.append(", "); sb.append("numTasks:"); sb.append(this.numTasks); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class TEnqueueTaskReservationsRequestStandardSchemeFactory implements SchemeFactory { public TEnqueueTaskReservationsRequestStandardScheme getScheme() { return new TEnqueueTaskReservationsRequestStandardScheme(); } } private static class TEnqueueTaskReservationsRequestStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, TEnqueueTaskReservationsRequest struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // APP_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.appId = iprot.readString(); struct.setAppIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // USER if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.user = new TUserGroupInfo(); struct.user.read(iprot); struct.setUserIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // REQUEST_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.requestId = iprot.readString(); struct.setRequestIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // SCHEDULER_ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.schedulerAddress = new THostPort(); struct.schedulerAddress.read(iprot); struct.setSchedulerAddressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // NUM_TASKS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.numTasks = iprot.readI32(); struct.setNumTasksIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TEnqueueTaskReservationsRequest struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.appId != null) { oprot.writeFieldBegin(APP_ID_FIELD_DESC); oprot.writeString(struct.appId); oprot.writeFieldEnd(); } if (struct.user != null) { oprot.writeFieldBegin(USER_FIELD_DESC); struct.user.write(oprot); oprot.writeFieldEnd(); } if (struct.requestId != null) { oprot.writeFieldBegin(REQUEST_ID_FIELD_DESC); oprot.writeString(struct.requestId); oprot.writeFieldEnd(); } if (struct.schedulerAddress != null) { oprot.writeFieldBegin(SCHEDULER_ADDRESS_FIELD_DESC); struct.schedulerAddress.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(NUM_TASKS_FIELD_DESC); oprot.writeI32(struct.numTasks); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TEnqueueTaskReservationsRequestTupleSchemeFactory implements SchemeFactory { public TEnqueueTaskReservationsRequestTupleScheme getScheme() { return new TEnqueueTaskReservationsRequestTupleScheme(); } } private static class TEnqueueTaskReservationsRequestTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TEnqueueTaskReservationsRequest struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetAppId()) { optionals.set(0); } if (struct.isSetUser()) { optionals.set(1); } if (struct.isSetRequestId()) { optionals.set(2); } if (struct.isSetSchedulerAddress()) { optionals.set(3); } if (struct.isSetNumTasks()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetAppId()) { oprot.writeString(struct.appId); } if (struct.isSetUser()) { struct.user.write(oprot); } if (struct.isSetRequestId()) { oprot.writeString(struct.requestId); } if (struct.isSetSchedulerAddress()) { struct.schedulerAddress.write(oprot); } if (struct.isSetNumTasks()) { oprot.writeI32(struct.numTasks); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TEnqueueTaskReservationsRequest struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.appId = iprot.readString(); struct.setAppIdIsSet(true); } if (incoming.get(1)) { struct.user = new TUserGroupInfo(); struct.user.read(iprot); struct.setUserIsSet(true); } if (incoming.get(2)) { struct.requestId = iprot.readString(); struct.setRequestIdIsSet(true); } if (incoming.get(3)) { struct.schedulerAddress = new THostPort(); struct.schedulerAddress.read(iprot); struct.setSchedulerAddressIsSet(true); } if (incoming.get(4)) { struct.numTasks = iprot.readI32(); struct.setNumTasksIsSet(true); } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/TFullTaskId.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TFullTaskId implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TFullTaskId"); 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); 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); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new TFullTaskIdStandardSchemeFactory()); schemes.put(TupleScheme.class, new TFullTaskIdTupleSchemeFactory()); } public String taskId; // required public String requestId; // required public String appId; // required public THostPort schedulerAddress; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TASK_ID((short)1, "taskId"), REQUEST_ID((short)2, "requestId"), APP_ID((short)3, "appId"), SCHEDULER_ADDRESS((short)4, "schedulerAddress"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TASK_ID return TASK_ID; case 2: // REQUEST_ID return REQUEST_ID; case 3: // APP_ID return APP_ID; case 4: // SCHEDULER_ADDRESS return SCHEDULER_ADDRESS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.REQUEST_ID, new org.apache.thrift.meta_data.FieldMetaData("requestId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.APP_ID, new org.apache.thrift.meta_data.FieldMetaData("appId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.SCHEDULER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("schedulerAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THostPort.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TFullTaskId.class, metaDataMap); } public TFullTaskId() { } public TFullTaskId( String taskId, String requestId, String appId, THostPort schedulerAddress) { this(); this.taskId = taskId; this.requestId = requestId; this.appId = appId; this.schedulerAddress = schedulerAddress; } /** * Performs a deep copy on other. */ public TFullTaskId(TFullTaskId other) { if (other.isSetTaskId()) { this.taskId = other.taskId; } if (other.isSetRequestId()) { this.requestId = other.requestId; } if (other.isSetAppId()) { this.appId = other.appId; } if (other.isSetSchedulerAddress()) { this.schedulerAddress = new THostPort(other.schedulerAddress); } } public TFullTaskId deepCopy() { return new TFullTaskId(this); } public void clear() { this.taskId = null; this.requestId = null; this.appId = null; this.schedulerAddress = null; } public String getTaskId() { return this.taskId; } public TFullTaskId setTaskId(String taskId) { this.taskId = taskId; return this; } public void unsetTaskId() { this.taskId = null; } /** Returns true if field taskId is set (has been assigned a value) and false otherwise */ public boolean isSetTaskId() { return this.taskId != null; } public void setTaskIdIsSet(boolean value) { if (!value) { this.taskId = null; } } public String getRequestId() { return this.requestId; } public TFullTaskId setRequestId(String requestId) { this.requestId = requestId; return this; } public void unsetRequestId() { this.requestId = null; } /** Returns true if field requestId is set (has been assigned a value) and false otherwise */ public boolean isSetRequestId() { return this.requestId != null; } public void setRequestIdIsSet(boolean value) { if (!value) { this.requestId = null; } } public String getAppId() { return this.appId; } public TFullTaskId setAppId(String appId) { this.appId = appId; return this; } public void unsetAppId() { this.appId = null; } /** Returns true if field appId is set (has been assigned a value) and false otherwise */ public boolean isSetAppId() { return this.appId != null; } public void setAppIdIsSet(boolean value) { if (!value) { this.appId = null; } } public THostPort getSchedulerAddress() { return this.schedulerAddress; } public TFullTaskId setSchedulerAddress(THostPort schedulerAddress) { this.schedulerAddress = schedulerAddress; return this; } public void unsetSchedulerAddress() { this.schedulerAddress = null; } /** Returns true if field schedulerAddress is set (has been assigned a value) and false otherwise */ public boolean isSetSchedulerAddress() { return this.schedulerAddress != null; } public void setSchedulerAddressIsSet(boolean value) { if (!value) { this.schedulerAddress = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TASK_ID: if (value == null) { unsetTaskId(); } else { setTaskId((String)value); } break; case REQUEST_ID: if (value == null) { unsetRequestId(); } else { setRequestId((String)value); } break; case APP_ID: if (value == null) { unsetAppId(); } else { setAppId((String)value); } break; case SCHEDULER_ADDRESS: if (value == null) { unsetSchedulerAddress(); } else { setSchedulerAddress((THostPort)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TASK_ID: return getTaskId(); case REQUEST_ID: return getRequestId(); case APP_ID: return getAppId(); case SCHEDULER_ADDRESS: return getSchedulerAddress(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TASK_ID: return isSetTaskId(); case REQUEST_ID: return isSetRequestId(); case APP_ID: return isSetAppId(); case SCHEDULER_ADDRESS: return isSetSchedulerAddress(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TFullTaskId) return this.equals((TFullTaskId)that); return false; } public boolean equals(TFullTaskId that) { if (that == null) return false; boolean this_present_taskId = true && this.isSetTaskId(); boolean that_present_taskId = true && that.isSetTaskId(); if (this_present_taskId || that_present_taskId) { if (!(this_present_taskId && that_present_taskId)) return false; if (!this.taskId.equals(that.taskId)) return false; } boolean this_present_requestId = true && this.isSetRequestId(); boolean that_present_requestId = true && that.isSetRequestId(); if (this_present_requestId || that_present_requestId) { if (!(this_present_requestId && that_present_requestId)) return false; if (!this.requestId.equals(that.requestId)) return false; } boolean this_present_appId = true && this.isSetAppId(); boolean that_present_appId = true && that.isSetAppId(); if (this_present_appId || that_present_appId) { if (!(this_present_appId && that_present_appId)) return false; if (!this.appId.equals(that.appId)) return false; } boolean this_present_schedulerAddress = true && this.isSetSchedulerAddress(); boolean that_present_schedulerAddress = true && that.isSetSchedulerAddress(); if (this_present_schedulerAddress || that_present_schedulerAddress) { if (!(this_present_schedulerAddress && that_present_schedulerAddress)) return false; if (!this.schedulerAddress.equals(that.schedulerAddress)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(TFullTaskId other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; TFullTaskId typedOther = (TFullTaskId)other; lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId()); if (lastComparison != 0) { return lastComparison; } if (isSetTaskId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, typedOther.taskId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRequestId()).compareTo(typedOther.isSetRequestId()); if (lastComparison != 0) { return lastComparison; } if (isSetRequestId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestId, typedOther.requestId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetAppId()).compareTo(typedOther.isSetAppId()); if (lastComparison != 0) { return lastComparison; } if (isSetAppId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.appId, typedOther.appId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSchedulerAddress()).compareTo(typedOther.isSetSchedulerAddress()); if (lastComparison != 0) { return lastComparison; } if (isSetSchedulerAddress()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schedulerAddress, typedOther.schedulerAddress); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("TFullTaskId("); boolean first = true; sb.append("taskId:"); if (this.taskId == null) { sb.append("null"); } else { sb.append(this.taskId); } first = false; if (!first) sb.append(", "); sb.append("requestId:"); if (this.requestId == null) { sb.append("null"); } else { sb.append(this.requestId); } first = false; if (!first) sb.append(", "); sb.append("appId:"); if (this.appId == null) { sb.append("null"); } else { sb.append(this.appId); } first = false; if (!first) sb.append(", "); sb.append("schedulerAddress:"); if (this.schedulerAddress == null) { sb.append("null"); } else { sb.append(this.schedulerAddress); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class TFullTaskIdStandardSchemeFactory implements SchemeFactory { public TFullTaskIdStandardScheme getScheme() { return new TFullTaskIdStandardScheme(); } } private static class TFullTaskIdStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, TFullTaskId struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TASK_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.taskId = iprot.readString(); struct.setTaskIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // REQUEST_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.requestId = iprot.readString(); struct.setRequestIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // APP_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.appId = iprot.readString(); struct.setAppIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // SCHEDULER_ADDRESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.schedulerAddress = new THostPort(); struct.schedulerAddress.read(iprot); struct.setSchedulerAddressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TFullTaskId struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.taskId != null) { oprot.writeFieldBegin(TASK_ID_FIELD_DESC); oprot.writeString(struct.taskId); oprot.writeFieldEnd(); } if (struct.requestId != null) { oprot.writeFieldBegin(REQUEST_ID_FIELD_DESC); oprot.writeString(struct.requestId); oprot.writeFieldEnd(); } if (struct.appId != null) { oprot.writeFieldBegin(APP_ID_FIELD_DESC); oprot.writeString(struct.appId); oprot.writeFieldEnd(); } if (struct.schedulerAddress != null) { oprot.writeFieldBegin(SCHEDULER_ADDRESS_FIELD_DESC); struct.schedulerAddress.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TFullTaskIdTupleSchemeFactory implements SchemeFactory { public TFullTaskIdTupleScheme getScheme() { return new TFullTaskIdTupleScheme(); } } private static class TFullTaskIdTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TFullTaskId struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetTaskId()) { optionals.set(0); } if (struct.isSetRequestId()) { optionals.set(1); } if (struct.isSetAppId()) { optionals.set(2); } if (struct.isSetSchedulerAddress()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetTaskId()) { oprot.writeString(struct.taskId); } if (struct.isSetRequestId()) { oprot.writeString(struct.requestId); } if (struct.isSetAppId()) { oprot.writeString(struct.appId); } if (struct.isSetSchedulerAddress()) { struct.schedulerAddress.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TFullTaskId struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.taskId = iprot.readString(); struct.setTaskIdIsSet(true); } if (incoming.get(1)) { struct.requestId = iprot.readString(); struct.setRequestIdIsSet(true); } if (incoming.get(2)) { struct.appId = iprot.readString(); struct.setAppIdIsSet(true); } if (incoming.get(3)) { struct.schedulerAddress = new THostPort(); struct.schedulerAddress.read(iprot); struct.setSchedulerAddressIsSet(true); } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/THostPort.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class THostPort implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("THostPort"); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new THostPortStandardSchemeFactory()); schemes.put(TupleScheme.class, new THostPortTupleSchemeFactory()); } public String host; // required public int port; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { HOST((short)1, "host"), PORT((short)2, "port"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // HOST return HOST; case 2: // PORT return PORT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __PORT_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(THostPort.class, metaDataMap); } public THostPort() { } public THostPort( String host, int port) { this(); this.host = host; this.port = port; setPortIsSet(true); } /** * Performs a deep copy on other. */ public THostPort(THostPort other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetHost()) { this.host = other.host; } this.port = other.port; } public THostPort deepCopy() { return new THostPort(this); } public void clear() { this.host = null; setPortIsSet(false); this.port = 0; } public String getHost() { return this.host; } public THostPort setHost(String host) { this.host = host; return this; } public void unsetHost() { this.host = null; } /** Returns true if field host is set (has been assigned a value) and false otherwise */ public boolean isSetHost() { return this.host != null; } public void setHostIsSet(boolean value) { if (!value) { this.host = null; } } public int getPort() { return this.port; } public THostPort setPort(int port) { this.port = port; setPortIsSet(true); return this; } public void unsetPort() { __isset_bit_vector.clear(__PORT_ISSET_ID); } /** Returns true if field port is set (has been assigned a value) and false otherwise */ public boolean isSetPort() { return __isset_bit_vector.get(__PORT_ISSET_ID); } public void setPortIsSet(boolean value) { __isset_bit_vector.set(__PORT_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case HOST: if (value == null) { unsetHost(); } else { setHost((String)value); } break; case PORT: if (value == null) { unsetPort(); } else { setPort((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case HOST: return getHost(); case PORT: return Integer.valueOf(getPort()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case HOST: return isSetHost(); case PORT: return isSetPort(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof THostPort) return this.equals((THostPort)that); return false; } public boolean equals(THostPort that) { if (that == null) return false; boolean this_present_host = true && this.isSetHost(); boolean that_present_host = true && that.isSetHost(); if (this_present_host || that_present_host) { if (!(this_present_host && that_present_host)) return false; if (!this.host.equals(that.host)) return false; } boolean this_present_port = true; boolean that_present_port = true; if (this_present_port || that_present_port) { if (!(this_present_port && that_present_port)) return false; if (this.port != that.port) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(THostPort other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; THostPort typedOther = (THostPort)other; lastComparison = Boolean.valueOf(isSetHost()).compareTo(typedOther.isSetHost()); if (lastComparison != 0) { return lastComparison; } if (isSetHost()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, typedOther.host); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPort()).compareTo(typedOther.isSetPort()); if (lastComparison != 0) { return lastComparison; } if (isSetPort()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, typedOther.port); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("THostPort("); boolean first = true; sb.append("host:"); if (this.host == null) { sb.append("null"); } else { sb.append(this.host); } first = false; if (!first) sb.append(", "); sb.append("port:"); sb.append(this.port); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class THostPortStandardSchemeFactory implements SchemeFactory { public THostPortStandardScheme getScheme() { return new THostPortStandardScheme(); } } private static class THostPortStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, THostPort struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // HOST if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.host = iprot.readString(); struct.setHostIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PORT if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.port = iprot.readI32(); struct.setPortIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, THostPort struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.host != null) { oprot.writeFieldBegin(HOST_FIELD_DESC); oprot.writeString(struct.host); oprot.writeFieldEnd(); } oprot.writeFieldBegin(PORT_FIELD_DESC); oprot.writeI32(struct.port); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class THostPortTupleSchemeFactory implements SchemeFactory { public THostPortTupleScheme getScheme() { return new THostPortTupleScheme(); } } private static class THostPortTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, THostPort struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetHost()) { optionals.set(0); } if (struct.isSetPort()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetHost()) { oprot.writeString(struct.host); } if (struct.isSetPort()) { oprot.writeI32(struct.port); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, THostPort struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.host = iprot.readString(); struct.setHostIsSet(true); } if (incoming.get(1)) { struct.port = iprot.readI32(); struct.setPortIsSet(true); } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/TNodeState.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TNodeState implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TNodeState"); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new TNodeStateStandardSchemeFactory()); schemes.put(TupleScheme.class, new TNodeStateTupleSchemeFactory()); } public TResourceVector sparrowUsage; // required public TResourceVector externalUsage; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SPARROW_USAGE((short)1, "sparrowUsage"), EXTERNAL_USAGE((short)2, "externalUsage"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SPARROW_USAGE return SPARROW_USAGE; case 2: // EXTERNAL_USAGE return EXTERNAL_USAGE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SPARROW_USAGE, new org.apache.thrift.meta_data.FieldMetaData("sparrowUsage", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResourceVector.class))); tmpMap.put(_Fields.EXTERNAL_USAGE, new org.apache.thrift.meta_data.FieldMetaData("externalUsage", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TResourceVector.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TNodeState.class, metaDataMap); } public TNodeState() { } public TNodeState( TResourceVector sparrowUsage, TResourceVector externalUsage) { this(); this.sparrowUsage = sparrowUsage; this.externalUsage = externalUsage; } /** * Performs a deep copy on other. */ public TNodeState(TNodeState other) { if (other.isSetSparrowUsage()) { this.sparrowUsage = new TResourceVector(other.sparrowUsage); } if (other.isSetExternalUsage()) { this.externalUsage = new TResourceVector(other.externalUsage); } } public TNodeState deepCopy() { return new TNodeState(this); } public void clear() { this.sparrowUsage = null; this.externalUsage = null; } public TResourceVector getSparrowUsage() { return this.sparrowUsage; } public TNodeState setSparrowUsage(TResourceVector sparrowUsage) { this.sparrowUsage = sparrowUsage; return this; } public void unsetSparrowUsage() { this.sparrowUsage = null; } /** Returns true if field sparrowUsage is set (has been assigned a value) and false otherwise */ public boolean isSetSparrowUsage() { return this.sparrowUsage != null; } public void setSparrowUsageIsSet(boolean value) { if (!value) { this.sparrowUsage = null; } } public TResourceVector getExternalUsage() { return this.externalUsage; } public TNodeState setExternalUsage(TResourceVector externalUsage) { this.externalUsage = externalUsage; return this; } public void unsetExternalUsage() { this.externalUsage = null; } /** Returns true if field externalUsage is set (has been assigned a value) and false otherwise */ public boolean isSetExternalUsage() { return this.externalUsage != null; } public void setExternalUsageIsSet(boolean value) { if (!value) { this.externalUsage = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SPARROW_USAGE: if (value == null) { unsetSparrowUsage(); } else { setSparrowUsage((TResourceVector)value); } break; case EXTERNAL_USAGE: if (value == null) { unsetExternalUsage(); } else { setExternalUsage((TResourceVector)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SPARROW_USAGE: return getSparrowUsage(); case EXTERNAL_USAGE: return getExternalUsage(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SPARROW_USAGE: return isSetSparrowUsage(); case EXTERNAL_USAGE: return isSetExternalUsage(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TNodeState) return this.equals((TNodeState)that); return false; } public boolean equals(TNodeState that) { if (that == null) return false; boolean this_present_sparrowUsage = true && this.isSetSparrowUsage(); boolean that_present_sparrowUsage = true && that.isSetSparrowUsage(); if (this_present_sparrowUsage || that_present_sparrowUsage) { if (!(this_present_sparrowUsage && that_present_sparrowUsage)) return false; if (!this.sparrowUsage.equals(that.sparrowUsage)) return false; } boolean this_present_externalUsage = true && this.isSetExternalUsage(); boolean that_present_externalUsage = true && that.isSetExternalUsage(); if (this_present_externalUsage || that_present_externalUsage) { if (!(this_present_externalUsage && that_present_externalUsage)) return false; if (!this.externalUsage.equals(that.externalUsage)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(TNodeState other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; TNodeState typedOther = (TNodeState)other; lastComparison = Boolean.valueOf(isSetSparrowUsage()).compareTo(typedOther.isSetSparrowUsage()); if (lastComparison != 0) { return lastComparison; } if (isSetSparrowUsage()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sparrowUsage, typedOther.sparrowUsage); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetExternalUsage()).compareTo(typedOther.isSetExternalUsage()); if (lastComparison != 0) { return lastComparison; } if (isSetExternalUsage()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.externalUsage, typedOther.externalUsage); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("TNodeState("); boolean first = true; sb.append("sparrowUsage:"); if (this.sparrowUsage == null) { sb.append("null"); } else { sb.append(this.sparrowUsage); } first = false; if (!first) sb.append(", "); sb.append("externalUsage:"); if (this.externalUsage == null) { sb.append("null"); } else { sb.append(this.externalUsage); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class TNodeStateStandardSchemeFactory implements SchemeFactory { public TNodeStateStandardScheme getScheme() { return new TNodeStateStandardScheme(); } } private static class TNodeStateStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, TNodeState struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SPARROW_USAGE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.sparrowUsage = new TResourceVector(); struct.sparrowUsage.read(iprot); struct.setSparrowUsageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // EXTERNAL_USAGE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.externalUsage = new TResourceVector(); struct.externalUsage.read(iprot); struct.setExternalUsageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TNodeState struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.sparrowUsage != null) { oprot.writeFieldBegin(SPARROW_USAGE_FIELD_DESC); struct.sparrowUsage.write(oprot); oprot.writeFieldEnd(); } if (struct.externalUsage != null) { oprot.writeFieldBegin(EXTERNAL_USAGE_FIELD_DESC); struct.externalUsage.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TNodeStateTupleSchemeFactory implements SchemeFactory { public TNodeStateTupleScheme getScheme() { return new TNodeStateTupleScheme(); } } private static class TNodeStateTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TNodeState struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSparrowUsage()) { optionals.set(0); } if (struct.isSetExternalUsage()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSparrowUsage()) { struct.sparrowUsage.write(oprot); } if (struct.isSetExternalUsage()) { struct.externalUsage.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TNodeState struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.sparrowUsage = new TResourceVector(); struct.sparrowUsage.read(iprot); struct.setSparrowUsageIsSet(true); } if (incoming.get(1)) { struct.externalUsage = new TResourceVector(); struct.externalUsage.read(iprot); struct.setExternalUsageIsSet(true); } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/TPlacementPreference.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TPlacementPreference implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPlacementPreference"); 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); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new TPlacementPreferenceStandardSchemeFactory()); schemes.put(TupleScheme.class, new TPlacementPreferenceTupleSchemeFactory()); } public List nodes; // required public List racks; // required public int delayThreshold; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { NODES((short)1, "nodes"), RACKS((short)2, "racks"), DELAY_THRESHOLD((short)3, "delayThreshold"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // NODES return NODES; case 2: // RACKS return RACKS; case 3: // DELAY_THRESHOLD return DELAY_THRESHOLD; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __DELAYTHRESHOLD_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.NODES, new org.apache.thrift.meta_data.FieldMetaData("nodes", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.RACKS, new org.apache.thrift.meta_data.FieldMetaData("racks", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.DELAY_THRESHOLD, new org.apache.thrift.meta_data.FieldMetaData("delayThreshold", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPlacementPreference.class, metaDataMap); } public TPlacementPreference() { } public TPlacementPreference( List nodes, List racks, int delayThreshold) { this(); this.nodes = nodes; this.racks = racks; this.delayThreshold = delayThreshold; setDelayThresholdIsSet(true); } /** * Performs a deep copy on other. */ public TPlacementPreference(TPlacementPreference other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetNodes()) { List __this__nodes = new ArrayList(); for (String other_element : other.nodes) { __this__nodes.add(other_element); } this.nodes = __this__nodes; } if (other.isSetRacks()) { List __this__racks = new ArrayList(); for (String other_element : other.racks) { __this__racks.add(other_element); } this.racks = __this__racks; } this.delayThreshold = other.delayThreshold; } public TPlacementPreference deepCopy() { return new TPlacementPreference(this); } public void clear() { this.nodes = null; this.racks = null; setDelayThresholdIsSet(false); this.delayThreshold = 0; } public int getNodesSize() { return (this.nodes == null) ? 0 : this.nodes.size(); } public java.util.Iterator getNodesIterator() { return (this.nodes == null) ? null : this.nodes.iterator(); } public void addToNodes(String elem) { if (this.nodes == null) { this.nodes = new ArrayList(); } this.nodes.add(elem); } public List getNodes() { return this.nodes; } public TPlacementPreference setNodes(List nodes) { this.nodes = nodes; return this; } public void unsetNodes() { this.nodes = null; } /** Returns true if field nodes is set (has been assigned a value) and false otherwise */ public boolean isSetNodes() { return this.nodes != null; } public void setNodesIsSet(boolean value) { if (!value) { this.nodes = null; } } public int getRacksSize() { return (this.racks == null) ? 0 : this.racks.size(); } public java.util.Iterator getRacksIterator() { return (this.racks == null) ? null : this.racks.iterator(); } public void addToRacks(String elem) { if (this.racks == null) { this.racks = new ArrayList(); } this.racks.add(elem); } public List getRacks() { return this.racks; } public TPlacementPreference setRacks(List racks) { this.racks = racks; return this; } public void unsetRacks() { this.racks = null; } /** Returns true if field racks is set (has been assigned a value) and false otherwise */ public boolean isSetRacks() { return this.racks != null; } public void setRacksIsSet(boolean value) { if (!value) { this.racks = null; } } public int getDelayThreshold() { return this.delayThreshold; } public TPlacementPreference setDelayThreshold(int delayThreshold) { this.delayThreshold = delayThreshold; setDelayThresholdIsSet(true); return this; } public void unsetDelayThreshold() { __isset_bit_vector.clear(__DELAYTHRESHOLD_ISSET_ID); } /** Returns true if field delayThreshold is set (has been assigned a value) and false otherwise */ public boolean isSetDelayThreshold() { return __isset_bit_vector.get(__DELAYTHRESHOLD_ISSET_ID); } public void setDelayThresholdIsSet(boolean value) { __isset_bit_vector.set(__DELAYTHRESHOLD_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case NODES: if (value == null) { unsetNodes(); } else { setNodes((List)value); } break; case RACKS: if (value == null) { unsetRacks(); } else { setRacks((List)value); } break; case DELAY_THRESHOLD: if (value == null) { unsetDelayThreshold(); } else { setDelayThreshold((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case NODES: return getNodes(); case RACKS: return getRacks(); case DELAY_THRESHOLD: return Integer.valueOf(getDelayThreshold()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case NODES: return isSetNodes(); case RACKS: return isSetRacks(); case DELAY_THRESHOLD: return isSetDelayThreshold(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TPlacementPreference) return this.equals((TPlacementPreference)that); return false; } public boolean equals(TPlacementPreference that) { if (that == null) return false; boolean this_present_nodes = true && this.isSetNodes(); boolean that_present_nodes = true && that.isSetNodes(); if (this_present_nodes || that_present_nodes) { if (!(this_present_nodes && that_present_nodes)) return false; if (!this.nodes.equals(that.nodes)) return false; } boolean this_present_racks = true && this.isSetRacks(); boolean that_present_racks = true && that.isSetRacks(); if (this_present_racks || that_present_racks) { if (!(this_present_racks && that_present_racks)) return false; if (!this.racks.equals(that.racks)) return false; } boolean this_present_delayThreshold = true; boolean that_present_delayThreshold = true; if (this_present_delayThreshold || that_present_delayThreshold) { if (!(this_present_delayThreshold && that_present_delayThreshold)) return false; if (this.delayThreshold != that.delayThreshold) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(TPlacementPreference other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; TPlacementPreference typedOther = (TPlacementPreference)other; lastComparison = Boolean.valueOf(isSetNodes()).compareTo(typedOther.isSetNodes()); if (lastComparison != 0) { return lastComparison; } if (isSetNodes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodes, typedOther.nodes); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRacks()).compareTo(typedOther.isSetRacks()); if (lastComparison != 0) { return lastComparison; } if (isSetRacks()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.racks, typedOther.racks); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDelayThreshold()).compareTo(typedOther.isSetDelayThreshold()); if (lastComparison != 0) { return lastComparison; } if (isSetDelayThreshold()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delayThreshold, typedOther.delayThreshold); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("TPlacementPreference("); boolean first = true; sb.append("nodes:"); if (this.nodes == null) { sb.append("null"); } else { sb.append(this.nodes); } first = false; if (!first) sb.append(", "); sb.append("racks:"); if (this.racks == null) { sb.append("null"); } else { sb.append(this.racks); } first = false; if (!first) sb.append(", "); sb.append("delayThreshold:"); sb.append(this.delayThreshold); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class TPlacementPreferenceStandardSchemeFactory implements SchemeFactory { public TPlacementPreferenceStandardScheme getScheme() { return new TPlacementPreferenceStandardScheme(); } } private static class TPlacementPreferenceStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, TPlacementPreference struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // NODES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); struct.nodes = new ArrayList(_list0.size); for (int _i1 = 0; _i1 < _list0.size; ++_i1) { String _elem2; // required _elem2 = iprot.readString(); struct.nodes.add(_elem2); } iprot.readListEnd(); } struct.setNodesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // RACKS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); struct.racks = new ArrayList(_list3.size); for (int _i4 = 0; _i4 < _list3.size; ++_i4) { String _elem5; // required _elem5 = iprot.readString(); struct.racks.add(_elem5); } iprot.readListEnd(); } struct.setRacksIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // DELAY_THRESHOLD if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.delayThreshold = iprot.readI32(); struct.setDelayThresholdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TPlacementPreference struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.nodes != null) { oprot.writeFieldBegin(NODES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.nodes.size())); for (String _iter6 : struct.nodes) { oprot.writeString(_iter6); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.racks != null) { oprot.writeFieldBegin(RACKS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.racks.size())); for (String _iter7 : struct.racks) { oprot.writeString(_iter7); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELAY_THRESHOLD_FIELD_DESC); oprot.writeI32(struct.delayThreshold); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TPlacementPreferenceTupleSchemeFactory implements SchemeFactory { public TPlacementPreferenceTupleScheme getScheme() { return new TPlacementPreferenceTupleScheme(); } } private static class TPlacementPreferenceTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TPlacementPreference struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetNodes()) { optionals.set(0); } if (struct.isSetRacks()) { optionals.set(1); } if (struct.isSetDelayThreshold()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetNodes()) { { oprot.writeI32(struct.nodes.size()); for (String _iter8 : struct.nodes) { oprot.writeString(_iter8); } } } if (struct.isSetRacks()) { { oprot.writeI32(struct.racks.size()); for (String _iter9 : struct.racks) { oprot.writeString(_iter9); } } } if (struct.isSetDelayThreshold()) { oprot.writeI32(struct.delayThreshold); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TPlacementPreference struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.nodes = new ArrayList(_list10.size); for (int _i11 = 0; _i11 < _list10.size; ++_i11) { String _elem12; // required _elem12 = iprot.readString(); struct.nodes.add(_elem12); } } struct.setNodesIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.racks = new ArrayList(_list13.size); for (int _i14 = 0; _i14 < _list13.size; ++_i14) { String _elem15; // required _elem15 = iprot.readString(); struct.racks.add(_elem15); } } struct.setRacksIsSet(true); } if (incoming.get(2)) { struct.delayThreshold = iprot.readI32(); struct.setDelayThresholdIsSet(true); } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/TResourceVector.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TResourceVector implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TResourceVector"); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new TResourceVectorStandardSchemeFactory()); schemes.put(TupleScheme.class, new TResourceVectorTupleSchemeFactory()); } public long memory; // required public int cores; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { MEMORY((short)1, "memory"), CORES((short)2, "cores"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // MEMORY return MEMORY; case 2: // CORES return CORES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __MEMORY_ISSET_ID = 0; private static final int __CORES_ISSET_ID = 1; private BitSet __isset_bit_vector = new BitSet(2); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.MEMORY, new org.apache.thrift.meta_data.FieldMetaData("memory", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CORES, new org.apache.thrift.meta_data.FieldMetaData("cores", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TResourceVector.class, metaDataMap); } public TResourceVector() { } public TResourceVector( long memory, int cores) { this(); this.memory = memory; setMemoryIsSet(true); this.cores = cores; setCoresIsSet(true); } /** * Performs a deep copy on other. */ public TResourceVector(TResourceVector other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.memory = other.memory; this.cores = other.cores; } public TResourceVector deepCopy() { return new TResourceVector(this); } public void clear() { setMemoryIsSet(false); this.memory = 0; setCoresIsSet(false); this.cores = 0; } public long getMemory() { return this.memory; } public TResourceVector setMemory(long memory) { this.memory = memory; setMemoryIsSet(true); return this; } public void unsetMemory() { __isset_bit_vector.clear(__MEMORY_ISSET_ID); } /** Returns true if field memory is set (has been assigned a value) and false otherwise */ public boolean isSetMemory() { return __isset_bit_vector.get(__MEMORY_ISSET_ID); } public void setMemoryIsSet(boolean value) { __isset_bit_vector.set(__MEMORY_ISSET_ID, value); } public int getCores() { return this.cores; } public TResourceVector setCores(int cores) { this.cores = cores; setCoresIsSet(true); return this; } public void unsetCores() { __isset_bit_vector.clear(__CORES_ISSET_ID); } /** Returns true if field cores is set (has been assigned a value) and false otherwise */ public boolean isSetCores() { return __isset_bit_vector.get(__CORES_ISSET_ID); } public void setCoresIsSet(boolean value) { __isset_bit_vector.set(__CORES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case MEMORY: if (value == null) { unsetMemory(); } else { setMemory((Long)value); } break; case CORES: if (value == null) { unsetCores(); } else { setCores((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case MEMORY: return Long.valueOf(getMemory()); case CORES: return Integer.valueOf(getCores()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case MEMORY: return isSetMemory(); case CORES: return isSetCores(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TResourceVector) return this.equals((TResourceVector)that); return false; } public boolean equals(TResourceVector that) { if (that == null) return false; boolean this_present_memory = true; boolean that_present_memory = true; if (this_present_memory || that_present_memory) { if (!(this_present_memory && that_present_memory)) return false; if (this.memory != that.memory) return false; } boolean this_present_cores = true; boolean that_present_cores = true; if (this_present_cores || that_present_cores) { if (!(this_present_cores && that_present_cores)) return false; if (this.cores != that.cores) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(TResourceVector other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; TResourceVector typedOther = (TResourceVector)other; lastComparison = Boolean.valueOf(isSetMemory()).compareTo(typedOther.isSetMemory()); if (lastComparison != 0) { return lastComparison; } if (isSetMemory()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.memory, typedOther.memory); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCores()).compareTo(typedOther.isSetCores()); if (lastComparison != 0) { return lastComparison; } if (isSetCores()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cores, typedOther.cores); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("TResourceVector("); boolean first = true; sb.append("memory:"); sb.append(this.memory); first = false; if (!first) sb.append(", "); sb.append("cores:"); sb.append(this.cores); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class TResourceVectorStandardSchemeFactory implements SchemeFactory { public TResourceVectorStandardScheme getScheme() { return new TResourceVectorStandardScheme(); } } private static class TResourceVectorStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, TResourceVector struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // MEMORY if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.memory = iprot.readI64(); struct.setMemoryIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // CORES if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.cores = iprot.readI32(); struct.setCoresIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TResourceVector struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(MEMORY_FIELD_DESC); oprot.writeI64(struct.memory); oprot.writeFieldEnd(); oprot.writeFieldBegin(CORES_FIELD_DESC); oprot.writeI32(struct.cores); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TResourceVectorTupleSchemeFactory implements SchemeFactory { public TResourceVectorTupleScheme getScheme() { return new TResourceVectorTupleScheme(); } } private static class TResourceVectorTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TResourceVector struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetMemory()) { optionals.set(0); } if (struct.isSetCores()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetMemory()) { oprot.writeI64(struct.memory); } if (struct.isSetCores()) { oprot.writeI32(struct.cores); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TResourceVector struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.memory = iprot.readI64(); struct.setMemoryIsSet(true); } if (incoming.get(1)) { struct.cores = iprot.readI32(); struct.setCoresIsSet(true); } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/TSchedulingRequest.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TSchedulingRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSchedulingRequest"); 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); 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); 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); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new TSchedulingRequestStandardSchemeFactory()); schemes.put(TupleScheme.class, new TSchedulingRequestTupleSchemeFactory()); } public String app; // required public List tasks; // required public TUserGroupInfo user; // required public String description; // optional public double probeRatio; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { APP((short)1, "app"), TASKS((short)2, "tasks"), USER((short)3, "user"), DESCRIPTION((short)4, "description"), PROBE_RATIO((short)5, "probeRatio"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // APP return APP; case 2: // TASKS return TASKS; case 3: // USER return USER; case 4: // DESCRIPTION return DESCRIPTION; case 5: // PROBE_RATIO return PROBE_RATIO; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __PROBERATIO_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); private _Fields optionals[] = {_Fields.DESCRIPTION,_Fields.PROBE_RATIO}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.APP, new org.apache.thrift.meta_data.FieldMetaData("app", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TASKS, new org.apache.thrift.meta_data.FieldMetaData("tasks", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTaskSpec.class)))); tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TUserGroupInfo.class))); tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PROBE_RATIO, new org.apache.thrift.meta_data.FieldMetaData("probeRatio", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSchedulingRequest.class, metaDataMap); } public TSchedulingRequest() { } public TSchedulingRequest( String app, List tasks, TUserGroupInfo user) { this(); this.app = app; this.tasks = tasks; this.user = user; } /** * Performs a deep copy on other. */ public TSchedulingRequest(TSchedulingRequest other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetApp()) { this.app = other.app; } if (other.isSetTasks()) { List __this__tasks = new ArrayList(); for (TTaskSpec other_element : other.tasks) { __this__tasks.add(new TTaskSpec(other_element)); } this.tasks = __this__tasks; } if (other.isSetUser()) { this.user = new TUserGroupInfo(other.user); } if (other.isSetDescription()) { this.description = other.description; } this.probeRatio = other.probeRatio; } public TSchedulingRequest deepCopy() { return new TSchedulingRequest(this); } public void clear() { this.app = null; this.tasks = null; this.user = null; this.description = null; setProbeRatioIsSet(false); this.probeRatio = 0.0; } public String getApp() { return this.app; } public TSchedulingRequest setApp(String app) { this.app = app; return this; } public void unsetApp() { this.app = null; } /** Returns true if field app is set (has been assigned a value) and false otherwise */ public boolean isSetApp() { return this.app != null; } public void setAppIsSet(boolean value) { if (!value) { this.app = null; } } public int getTasksSize() { return (this.tasks == null) ? 0 : this.tasks.size(); } public java.util.Iterator getTasksIterator() { return (this.tasks == null) ? null : this.tasks.iterator(); } public void addToTasks(TTaskSpec elem) { if (this.tasks == null) { this.tasks = new ArrayList(); } this.tasks.add(elem); } public List getTasks() { return this.tasks; } public TSchedulingRequest setTasks(List tasks) { this.tasks = tasks; return this; } public void unsetTasks() { this.tasks = null; } /** Returns true if field tasks is set (has been assigned a value) and false otherwise */ public boolean isSetTasks() { return this.tasks != null; } public void setTasksIsSet(boolean value) { if (!value) { this.tasks = null; } } public TUserGroupInfo getUser() { return this.user; } public TSchedulingRequest setUser(TUserGroupInfo user) { this.user = user; return this; } public void unsetUser() { this.user = null; } /** Returns true if field user is set (has been assigned a value) and false otherwise */ public boolean isSetUser() { return this.user != null; } public void setUserIsSet(boolean value) { if (!value) { this.user = null; } } public String getDescription() { return this.description; } public TSchedulingRequest setDescription(String description) { this.description = description; return this; } public void unsetDescription() { this.description = null; } /** Returns true if field description is set (has been assigned a value) and false otherwise */ public boolean isSetDescription() { return this.description != null; } public void setDescriptionIsSet(boolean value) { if (!value) { this.description = null; } } public double getProbeRatio() { return this.probeRatio; } public TSchedulingRequest setProbeRatio(double probeRatio) { this.probeRatio = probeRatio; setProbeRatioIsSet(true); return this; } public void unsetProbeRatio() { __isset_bit_vector.clear(__PROBERATIO_ISSET_ID); } /** Returns true if field probeRatio is set (has been assigned a value) and false otherwise */ public boolean isSetProbeRatio() { return __isset_bit_vector.get(__PROBERATIO_ISSET_ID); } public void setProbeRatioIsSet(boolean value) { __isset_bit_vector.set(__PROBERATIO_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case APP: if (value == null) { unsetApp(); } else { setApp((String)value); } break; case TASKS: if (value == null) { unsetTasks(); } else { setTasks((List)value); } break; case USER: if (value == null) { unsetUser(); } else { setUser((TUserGroupInfo)value); } break; case DESCRIPTION: if (value == null) { unsetDescription(); } else { setDescription((String)value); } break; case PROBE_RATIO: if (value == null) { unsetProbeRatio(); } else { setProbeRatio((Double)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case APP: return getApp(); case TASKS: return getTasks(); case USER: return getUser(); case DESCRIPTION: return getDescription(); case PROBE_RATIO: return Double.valueOf(getProbeRatio()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case APP: return isSetApp(); case TASKS: return isSetTasks(); case USER: return isSetUser(); case DESCRIPTION: return isSetDescription(); case PROBE_RATIO: return isSetProbeRatio(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TSchedulingRequest) return this.equals((TSchedulingRequest)that); return false; } public boolean equals(TSchedulingRequest that) { if (that == null) return false; boolean this_present_app = true && this.isSetApp(); boolean that_present_app = true && that.isSetApp(); if (this_present_app || that_present_app) { if (!(this_present_app && that_present_app)) return false; if (!this.app.equals(that.app)) return false; } boolean this_present_tasks = true && this.isSetTasks(); boolean that_present_tasks = true && that.isSetTasks(); if (this_present_tasks || that_present_tasks) { if (!(this_present_tasks && that_present_tasks)) return false; if (!this.tasks.equals(that.tasks)) return false; } boolean this_present_user = true && this.isSetUser(); boolean that_present_user = true && that.isSetUser(); if (this_present_user || that_present_user) { if (!(this_present_user && that_present_user)) return false; if (!this.user.equals(that.user)) return false; } boolean this_present_description = true && this.isSetDescription(); boolean that_present_description = true && that.isSetDescription(); if (this_present_description || that_present_description) { if (!(this_present_description && that_present_description)) return false; if (!this.description.equals(that.description)) return false; } boolean this_present_probeRatio = true && this.isSetProbeRatio(); boolean that_present_probeRatio = true && that.isSetProbeRatio(); if (this_present_probeRatio || that_present_probeRatio) { if (!(this_present_probeRatio && that_present_probeRatio)) return false; if (this.probeRatio != that.probeRatio) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(TSchedulingRequest other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; TSchedulingRequest typedOther = (TSchedulingRequest)other; lastComparison = Boolean.valueOf(isSetApp()).compareTo(typedOther.isSetApp()); if (lastComparison != 0) { return lastComparison; } if (isSetApp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app, typedOther.app); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTasks()).compareTo(typedOther.isSetTasks()); if (lastComparison != 0) { return lastComparison; } if (isSetTasks()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tasks, typedOther.tasks); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser()); if (lastComparison != 0) { return lastComparison; } if (isSetUser()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, typedOther.user); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription()); if (lastComparison != 0) { return lastComparison; } if (isSetDescription()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetProbeRatio()).compareTo(typedOther.isSetProbeRatio()); if (lastComparison != 0) { return lastComparison; } if (isSetProbeRatio()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.probeRatio, typedOther.probeRatio); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("TSchedulingRequest("); boolean first = true; sb.append("app:"); if (this.app == null) { sb.append("null"); } else { sb.append(this.app); } first = false; if (!first) sb.append(", "); sb.append("tasks:"); if (this.tasks == null) { sb.append("null"); } else { sb.append(this.tasks); } first = false; if (!first) sb.append(", "); sb.append("user:"); if (this.user == null) { sb.append("null"); } else { sb.append(this.user); } first = false; if (isSetDescription()) { if (!first) sb.append(", "); sb.append("description:"); if (this.description == null) { sb.append("null"); } else { sb.append(this.description); } first = false; } if (isSetProbeRatio()) { if (!first) sb.append(", "); sb.append("probeRatio:"); sb.append(this.probeRatio); first = false; } sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class TSchedulingRequestStandardSchemeFactory implements SchemeFactory { public TSchedulingRequestStandardScheme getScheme() { return new TSchedulingRequestStandardScheme(); } } private static class TSchedulingRequestStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, TSchedulingRequest struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // APP if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.app = iprot.readString(); struct.setAppIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TASKS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); struct.tasks = new ArrayList(_list16.size); for (int _i17 = 0; _i17 < _list16.size; ++_i17) { TTaskSpec _elem18; // required _elem18 = new TTaskSpec(); _elem18.read(iprot); struct.tasks.add(_elem18); } iprot.readListEnd(); } struct.setTasksIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // USER if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.user = new TUserGroupInfo(); struct.user.read(iprot); struct.setUserIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DESCRIPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.description = iprot.readString(); struct.setDescriptionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // PROBE_RATIO if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.probeRatio = iprot.readDouble(); struct.setProbeRatioIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TSchedulingRequest struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.app != null) { oprot.writeFieldBegin(APP_FIELD_DESC); oprot.writeString(struct.app); oprot.writeFieldEnd(); } if (struct.tasks != null) { oprot.writeFieldBegin(TASKS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tasks.size())); for (TTaskSpec _iter19 : struct.tasks) { _iter19.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.user != null) { oprot.writeFieldBegin(USER_FIELD_DESC); struct.user.write(oprot); oprot.writeFieldEnd(); } if (struct.description != null) { if (struct.isSetDescription()) { oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); oprot.writeString(struct.description); oprot.writeFieldEnd(); } } if (struct.isSetProbeRatio()) { oprot.writeFieldBegin(PROBE_RATIO_FIELD_DESC); oprot.writeDouble(struct.probeRatio); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TSchedulingRequestTupleSchemeFactory implements SchemeFactory { public TSchedulingRequestTupleScheme getScheme() { return new TSchedulingRequestTupleScheme(); } } private static class TSchedulingRequestTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TSchedulingRequest struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetApp()) { optionals.set(0); } if (struct.isSetTasks()) { optionals.set(1); } if (struct.isSetUser()) { optionals.set(2); } if (struct.isSetDescription()) { optionals.set(3); } if (struct.isSetProbeRatio()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetApp()) { oprot.writeString(struct.app); } if (struct.isSetTasks()) { { oprot.writeI32(struct.tasks.size()); for (TTaskSpec _iter20 : struct.tasks) { _iter20.write(oprot); } } } if (struct.isSetUser()) { struct.user.write(oprot); } if (struct.isSetDescription()) { oprot.writeString(struct.description); } if (struct.isSetProbeRatio()) { oprot.writeDouble(struct.probeRatio); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TSchedulingRequest struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.app = iprot.readString(); struct.setAppIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.tasks = new ArrayList(_list21.size); for (int _i22 = 0; _i22 < _list21.size; ++_i22) { TTaskSpec _elem23; // required _elem23 = new TTaskSpec(); _elem23.read(iprot); struct.tasks.add(_elem23); } } struct.setTasksIsSet(true); } if (incoming.get(2)) { struct.user = new TUserGroupInfo(); struct.user.read(iprot); struct.setUserIsSet(true); } if (incoming.get(3)) { struct.description = iprot.readString(); struct.setDescriptionIsSet(true); } if (incoming.get(4)) { struct.probeRatio = iprot.readDouble(); struct.setProbeRatioIsSet(true); } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/TTaskLaunchSpec.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TTaskLaunchSpec implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTaskLaunchSpec"); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new TTaskLaunchSpecStandardSchemeFactory()); schemes.put(TupleScheme.class, new TTaskLaunchSpecTupleSchemeFactory()); } public String taskId; // required public ByteBuffer message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TASK_ID((short)1, "taskId"), MESSAGE((short)2, "message"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TASK_ID return TASK_ID; case 2: // MESSAGE return MESSAGE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TTaskLaunchSpec.class, metaDataMap); } public TTaskLaunchSpec() { } public TTaskLaunchSpec( String taskId, ByteBuffer message) { this(); this.taskId = taskId; this.message = message; } /** * Performs a deep copy on other. */ public TTaskLaunchSpec(TTaskLaunchSpec other) { if (other.isSetTaskId()) { this.taskId = other.taskId; } if (other.isSetMessage()) { this.message = org.apache.thrift.TBaseHelper.copyBinary(other.message); ; } } public TTaskLaunchSpec deepCopy() { return new TTaskLaunchSpec(this); } public void clear() { this.taskId = null; this.message = null; } public String getTaskId() { return this.taskId; } public TTaskLaunchSpec setTaskId(String taskId) { this.taskId = taskId; return this; } public void unsetTaskId() { this.taskId = null; } /** Returns true if field taskId is set (has been assigned a value) and false otherwise */ public boolean isSetTaskId() { return this.taskId != null; } public void setTaskIdIsSet(boolean value) { if (!value) { this.taskId = null; } } public byte[] getMessage() { setMessage(org.apache.thrift.TBaseHelper.rightSize(message)); return message == null ? null : message.array(); } public ByteBuffer bufferForMessage() { return message; } public TTaskLaunchSpec setMessage(byte[] message) { setMessage(message == null ? (ByteBuffer)null : ByteBuffer.wrap(message)); return this; } public TTaskLaunchSpec setMessage(ByteBuffer message) { this.message = message; return this; } public void unsetMessage() { this.message = null; } /** Returns true if field message is set (has been assigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } public void setMessageIsSet(boolean value) { if (!value) { this.message = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TASK_ID: if (value == null) { unsetTaskId(); } else { setTaskId((String)value); } break; case MESSAGE: if (value == null) { unsetMessage(); } else { setMessage((ByteBuffer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TASK_ID: return getTaskId(); case MESSAGE: return getMessage(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TASK_ID: return isSetTaskId(); case MESSAGE: return isSetMessage(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TTaskLaunchSpec) return this.equals((TTaskLaunchSpec)that); return false; } public boolean equals(TTaskLaunchSpec that) { if (that == null) return false; boolean this_present_taskId = true && this.isSetTaskId(); boolean that_present_taskId = true && that.isSetTaskId(); if (this_present_taskId || that_present_taskId) { if (!(this_present_taskId && that_present_taskId)) return false; if (!this.taskId.equals(that.taskId)) return false; } boolean this_present_message = true && this.isSetMessage(); boolean that_present_message = true && that.isSetMessage(); if (this_present_message || that_present_message) { if (!(this_present_message && that_present_message)) return false; if (!this.message.equals(that.message)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(TTaskLaunchSpec other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; TTaskLaunchSpec typedOther = (TTaskLaunchSpec)other; lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId()); if (lastComparison != 0) { return lastComparison; } if (isSetTaskId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, typedOther.taskId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetMessage()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("TTaskLaunchSpec("); boolean first = true; sb.append("taskId:"); if (this.taskId == null) { sb.append("null"); } else { sb.append(this.taskId); } first = false; if (!first) sb.append(", "); sb.append("message:"); if (this.message == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.message, sb); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class TTaskLaunchSpecStandardSchemeFactory implements SchemeFactory { public TTaskLaunchSpecStandardScheme getScheme() { return new TTaskLaunchSpecStandardScheme(); } } private static class TTaskLaunchSpecStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, TTaskLaunchSpec struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TASK_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.taskId = iprot.readString(); struct.setTaskIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // MESSAGE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.message = iprot.readBinary(); struct.setMessageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TTaskLaunchSpec struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.taskId != null) { oprot.writeFieldBegin(TASK_ID_FIELD_DESC); oprot.writeString(struct.taskId); oprot.writeFieldEnd(); } if (struct.message != null) { oprot.writeFieldBegin(MESSAGE_FIELD_DESC); oprot.writeBinary(struct.message); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TTaskLaunchSpecTupleSchemeFactory implements SchemeFactory { public TTaskLaunchSpecTupleScheme getScheme() { return new TTaskLaunchSpecTupleScheme(); } } private static class TTaskLaunchSpecTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TTaskLaunchSpec struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetTaskId()) { optionals.set(0); } if (struct.isSetMessage()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetTaskId()) { oprot.writeString(struct.taskId); } if (struct.isSetMessage()) { oprot.writeBinary(struct.message); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TTaskLaunchSpec struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.taskId = iprot.readString(); struct.setTaskIdIsSet(true); } if (incoming.get(1)) { struct.message = iprot.readBinary(); struct.setMessageIsSet(true); } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/TTaskSpec.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TTaskSpec implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTaskSpec"); 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); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new TTaskSpecStandardSchemeFactory()); schemes.put(TupleScheme.class, new TTaskSpecTupleSchemeFactory()); } public String taskId; // required public TPlacementPreference preference; // required public ByteBuffer message; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TASK_ID((short)1, "taskId"), PREFERENCE((short)2, "preference"), MESSAGE((short)3, "message"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TASK_ID return TASK_ID; case 2: // PREFERENCE return PREFERENCE; case 3: // MESSAGE return MESSAGE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PREFERENCE, new org.apache.thrift.meta_data.FieldMetaData("preference", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPlacementPreference.class))); tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TTaskSpec.class, metaDataMap); } public TTaskSpec() { } public TTaskSpec( String taskId, TPlacementPreference preference, ByteBuffer message) { this(); this.taskId = taskId; this.preference = preference; this.message = message; } /** * Performs a deep copy on other. */ public TTaskSpec(TTaskSpec other) { if (other.isSetTaskId()) { this.taskId = other.taskId; } if (other.isSetPreference()) { this.preference = new TPlacementPreference(other.preference); } if (other.isSetMessage()) { this.message = org.apache.thrift.TBaseHelper.copyBinary(other.message); ; } } public TTaskSpec deepCopy() { return new TTaskSpec(this); } public void clear() { this.taskId = null; this.preference = null; this.message = null; } public String getTaskId() { return this.taskId; } public TTaskSpec setTaskId(String taskId) { this.taskId = taskId; return this; } public void unsetTaskId() { this.taskId = null; } /** Returns true if field taskId is set (has been assigned a value) and false otherwise */ public boolean isSetTaskId() { return this.taskId != null; } public void setTaskIdIsSet(boolean value) { if (!value) { this.taskId = null; } } public TPlacementPreference getPreference() { return this.preference; } public TTaskSpec setPreference(TPlacementPreference preference) { this.preference = preference; return this; } public void unsetPreference() { this.preference = null; } /** Returns true if field preference is set (has been assigned a value) and false otherwise */ public boolean isSetPreference() { return this.preference != null; } public void setPreferenceIsSet(boolean value) { if (!value) { this.preference = null; } } public byte[] getMessage() { setMessage(org.apache.thrift.TBaseHelper.rightSize(message)); return message == null ? null : message.array(); } public ByteBuffer bufferForMessage() { return message; } public TTaskSpec setMessage(byte[] message) { setMessage(message == null ? (ByteBuffer)null : ByteBuffer.wrap(message)); return this; } public TTaskSpec setMessage(ByteBuffer message) { this.message = message; return this; } public void unsetMessage() { this.message = null; } /** Returns true if field message is set (has been assigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } public void setMessageIsSet(boolean value) { if (!value) { this.message = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TASK_ID: if (value == null) { unsetTaskId(); } else { setTaskId((String)value); } break; case PREFERENCE: if (value == null) { unsetPreference(); } else { setPreference((TPlacementPreference)value); } break; case MESSAGE: if (value == null) { unsetMessage(); } else { setMessage((ByteBuffer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TASK_ID: return getTaskId(); case PREFERENCE: return getPreference(); case MESSAGE: return getMessage(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TASK_ID: return isSetTaskId(); case PREFERENCE: return isSetPreference(); case MESSAGE: return isSetMessage(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TTaskSpec) return this.equals((TTaskSpec)that); return false; } public boolean equals(TTaskSpec that) { if (that == null) return false; boolean this_present_taskId = true && this.isSetTaskId(); boolean that_present_taskId = true && that.isSetTaskId(); if (this_present_taskId || that_present_taskId) { if (!(this_present_taskId && that_present_taskId)) return false; if (!this.taskId.equals(that.taskId)) return false; } boolean this_present_preference = true && this.isSetPreference(); boolean that_present_preference = true && that.isSetPreference(); if (this_present_preference || that_present_preference) { if (!(this_present_preference && that_present_preference)) return false; if (!this.preference.equals(that.preference)) return false; } boolean this_present_message = true && this.isSetMessage(); boolean that_present_message = true && that.isSetMessage(); if (this_present_message || that_present_message) { if (!(this_present_message && that_present_message)) return false; if (!this.message.equals(that.message)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(TTaskSpec other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; TTaskSpec typedOther = (TTaskSpec)other; lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId()); if (lastComparison != 0) { return lastComparison; } if (isSetTaskId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, typedOther.taskId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPreference()).compareTo(typedOther.isSetPreference()); if (lastComparison != 0) { return lastComparison; } if (isSetPreference()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preference, typedOther.preference); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetMessage()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("TTaskSpec("); boolean first = true; sb.append("taskId:"); if (this.taskId == null) { sb.append("null"); } else { sb.append(this.taskId); } first = false; if (!first) sb.append(", "); sb.append("preference:"); if (this.preference == null) { sb.append("null"); } else { sb.append(this.preference); } first = false; if (!first) sb.append(", "); sb.append("message:"); if (this.message == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.message, sb); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class TTaskSpecStandardSchemeFactory implements SchemeFactory { public TTaskSpecStandardScheme getScheme() { return new TTaskSpecStandardScheme(); } } private static class TTaskSpecStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, TTaskSpec struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TASK_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.taskId = iprot.readString(); struct.setTaskIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PREFERENCE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.preference = new TPlacementPreference(); struct.preference.read(iprot); struct.setPreferenceIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // MESSAGE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.message = iprot.readBinary(); struct.setMessageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TTaskSpec struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.taskId != null) { oprot.writeFieldBegin(TASK_ID_FIELD_DESC); oprot.writeString(struct.taskId); oprot.writeFieldEnd(); } if (struct.preference != null) { oprot.writeFieldBegin(PREFERENCE_FIELD_DESC); struct.preference.write(oprot); oprot.writeFieldEnd(); } if (struct.message != null) { oprot.writeFieldBegin(MESSAGE_FIELD_DESC); oprot.writeBinary(struct.message); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TTaskSpecTupleSchemeFactory implements SchemeFactory { public TTaskSpecTupleScheme getScheme() { return new TTaskSpecTupleScheme(); } } private static class TTaskSpecTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TTaskSpec struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetTaskId()) { optionals.set(0); } if (struct.isSetPreference()) { optionals.set(1); } if (struct.isSetMessage()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetTaskId()) { oprot.writeString(struct.taskId); } if (struct.isSetPreference()) { struct.preference.write(oprot); } if (struct.isSetMessage()) { oprot.writeBinary(struct.message); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TTaskSpec struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.taskId = iprot.readString(); struct.setTaskIdIsSet(true); } if (incoming.get(1)) { struct.preference = new TPlacementPreference(); struct.preference.read(iprot); struct.setPreferenceIsSet(true); } if (incoming.get(2)) { struct.message = iprot.readBinary(); struct.setMessageIsSet(true); } } } } ================================================ FILE: src/main/gen-java/edu/berkeley/sparrow/thrift/TUserGroupInfo.java ================================================ /** * Autogenerated by Thrift Compiler (0.8.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.sparrow.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TUserGroupInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TUserGroupInfo"); 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); 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); 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); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { schemes.put(StandardScheme.class, new TUserGroupInfoStandardSchemeFactory()); schemes.put(TupleScheme.class, new TUserGroupInfoTupleSchemeFactory()); } public String user; // required public String group; // required public int priority; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER((short)1, "user"), GROUP((short)2, "group"), PRIORITY((short)3, "priority"); private static final Map byName = new HashMap(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER return USER; case 2: // GROUP return GROUP; case 3: // PRIORITY return PRIORITY; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __PRIORITY_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.GROUP, new org.apache.thrift.meta_data.FieldMetaData("group", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PRIORITY, new org.apache.thrift.meta_data.FieldMetaData("priority", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TUserGroupInfo.class, metaDataMap); } public TUserGroupInfo() { } public TUserGroupInfo( String user, String group, int priority) { this(); this.user = user; this.group = group; this.priority = priority; setPriorityIsSet(true); } /** * Performs a deep copy on other. */ public TUserGroupInfo(TUserGroupInfo other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetUser()) { this.user = other.user; } if (other.isSetGroup()) { this.group = other.group; } this.priority = other.priority; } public TUserGroupInfo deepCopy() { return new TUserGroupInfo(this); } public void clear() { this.user = null; this.group = null; setPriorityIsSet(false); this.priority = 0; } public String getUser() { return this.user; } public TUserGroupInfo setUser(String user) { this.user = user; return this; } public void unsetUser() { this.user = null; } /** Returns true if field user is set (has been assigned a value) and false otherwise */ public boolean isSetUser() { return this.user != null; } public void setUserIsSet(boolean value) { if (!value) { this.user = null; } } public String getGroup() { return this.group; } public TUserGroupInfo setGroup(String group) { this.group = group; return this; } public void unsetGroup() { this.group = null; } /** Returns true if field group is set (has been assigned a value) and false otherwise */ public boolean isSetGroup() { return this.group != null; } public void setGroupIsSet(boolean value) { if (!value) { this.group = null; } } public int getPriority() { return this.priority; } public TUserGroupInfo setPriority(int priority) { this.priority = priority; setPriorityIsSet(true); return this; } public void unsetPriority() { __isset_bit_vector.clear(__PRIORITY_ISSET_ID); } /** Returns true if field priority is set (has been assigned a value) and false otherwise */ public boolean isSetPriority() { return __isset_bit_vector.get(__PRIORITY_ISSET_ID); } public void setPriorityIsSet(boolean value) { __isset_bit_vector.set(__PRIORITY_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case USER: if (value == null) { unsetUser(); } else { setUser((String)value); } break; case GROUP: if (value == null) { unsetGroup(); } else { setGroup((String)value); } break; case PRIORITY: if (value == null) { unsetPriority(); } else { setPriority((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case USER: return getUser(); case GROUP: return getGroup(); case PRIORITY: return Integer.valueOf(getPriority()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case USER: return isSetUser(); case GROUP: return isSetGroup(); case PRIORITY: return isSetPriority(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TUserGroupInfo) return this.equals((TUserGroupInfo)that); return false; } public boolean equals(TUserGroupInfo that) { if (that == null) return false; boolean this_present_user = true && this.isSetUser(); boolean that_present_user = true && that.isSetUser(); if (this_present_user || that_present_user) { if (!(this_present_user && that_present_user)) return false; if (!this.user.equals(that.user)) return false; } boolean this_present_group = true && this.isSetGroup(); boolean that_present_group = true && that.isSetGroup(); if (this_present_group || that_present_group) { if (!(this_present_group && that_present_group)) return false; if (!this.group.equals(that.group)) return false; } boolean this_present_priority = true; boolean that_present_priority = true; if (this_present_priority || that_present_priority) { if (!(this_present_priority && that_present_priority)) return false; if (this.priority != that.priority) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(TUserGroupInfo other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; TUserGroupInfo typedOther = (TUserGroupInfo)other; lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser()); if (lastComparison != 0) { return lastComparison; } if (isSetUser()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, typedOther.user); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGroup()).compareTo(typedOther.isSetGroup()); if (lastComparison != 0) { return lastComparison; } if (isSetGroup()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group, typedOther.group); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPriority()).compareTo(typedOther.isSetPriority()); if (lastComparison != 0) { return lastComparison; } if (isSetPriority()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.priority, typedOther.priority); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("TUserGroupInfo("); boolean first = true; sb.append("user:"); if (this.user == null) { sb.append("null"); } else { sb.append(this.user); } first = false; if (!first) sb.append(", "); sb.append("group:"); if (this.group == null) { sb.append("null"); } else { sb.append(this.group); } first = false; if (!first) sb.append(", "); sb.append("priority:"); sb.append(this.priority); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te.getMessage()); } } private static class TUserGroupInfoStandardSchemeFactory implements SchemeFactory { public TUserGroupInfoStandardScheme getScheme() { return new TUserGroupInfoStandardScheme(); } } private static class TUserGroupInfoStandardScheme extends StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, TUserGroupInfo struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.user = iprot.readString(); struct.setUserIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // GROUP if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.group = iprot.readString(); struct.setGroupIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PRIORITY if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.priority = iprot.readI32(); struct.setPriorityIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TUserGroupInfo struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.user != null) { oprot.writeFieldBegin(USER_FIELD_DESC); oprot.writeString(struct.user); oprot.writeFieldEnd(); } if (struct.group != null) { oprot.writeFieldBegin(GROUP_FIELD_DESC); oprot.writeString(struct.group); oprot.writeFieldEnd(); } oprot.writeFieldBegin(PRIORITY_FIELD_DESC); oprot.writeI32(struct.priority); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TUserGroupInfoTupleSchemeFactory implements SchemeFactory { public TUserGroupInfoTupleScheme getScheme() { return new TUserGroupInfoTupleScheme(); } } private static class TUserGroupInfoTupleScheme extends TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TUserGroupInfo struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetUser()) { optionals.set(0); } if (struct.isSetGroup()) { optionals.set(1); } if (struct.isSetPriority()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetUser()) { oprot.writeString(struct.user); } if (struct.isSetGroup()) { oprot.writeString(struct.group); } if (struct.isSetPriority()) { oprot.writeI32(struct.priority); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TUserGroupInfo struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.user = iprot.readString(); struct.setUserIsSet(true); } if (incoming.get(1)) { struct.group = iprot.readString(); struct.setGroupIsSet(true); } if (incoming.get(2)) { struct.priority = iprot.readI32(); struct.setPriorityIsSet(true); } } } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/api/SparrowBackendClient.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.api; public class SparrowBackendClient { } ================================================ FILE: src/main/java/edu/berkeley/sparrow/api/SparrowFrontendClient.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.api; import java.io.IOException; import java.net.InetSocketAddress; import java.util.List; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.log4j.Logger; import org.apache.thrift.TException; import edu.berkeley.sparrow.daemon.util.Network; import edu.berkeley.sparrow.daemon.util.TClients; import edu.berkeley.sparrow.daemon.util.TServers; import edu.berkeley.sparrow.thrift.FrontendService; import edu.berkeley.sparrow.thrift.IncompleteRequestException; import edu.berkeley.sparrow.thrift.SchedulerService; import edu.berkeley.sparrow.thrift.SchedulerService.Client; import edu.berkeley.sparrow.thrift.TSchedulingRequest; import edu.berkeley.sparrow.thrift.TUserGroupInfo; /** * Java client to Sparrow scheduling service. Once a client is initialize()'d it * can be used safely from multiple threads. */ public class SparrowFrontendClient { public static boolean launchedServerAlready = false; private final static Logger LOG = Logger.getLogger(SparrowFrontendClient.class); private final static int NUM_CLIENTS = 8; // Number of concurrent requests we support private final static int DEFAULT_LISTEN_PORT = 50201; BlockingQueue clients = new LinkedBlockingQueue(); /** * Initialize a connection to a sparrow scheduler. * @param sparrowSchedulerAddr. The socket address of the Sparrow scheduler. * @param app. The application id. Note that this must be consistent across frontends * and backends. * @param frontendServer. A class which implements the frontend server interface (for * communication from Sparrow). * @throws IOException */ public void initialize(InetSocketAddress sparrowSchedulerAddr, String app, FrontendService.Iface frontendServer) throws TException, IOException { initialize(sparrowSchedulerAddr, app, frontendServer, DEFAULT_LISTEN_PORT); } /** * Initialize a connection to a sparrow scheduler. * @param sparrowSchedulerAddr. The socket address of the Sparrow scheduler. * @param app. The application id. Note that this must be consistent across frontends * and backends. * @param frontendServer. A class which implements the frontend server interface (for * communication from Sparrow). * @param listenPort. The port on which to listen for request from the scheduler. * @throws IOException */ public void initialize(InetSocketAddress sparrowSchedulerAddr, String app, FrontendService.Iface frontendServer, int listenPort) throws TException, IOException { FrontendService.Processor processor = new FrontendService.Processor(frontendServer); if (!launchedServerAlready) { try { TServers.launchThreadedThriftServer(listenPort, 8, processor); } catch (IOException e) { LOG.fatal("Couldn't launch server side of frontend", e); } launchedServerAlready = true; } for (int i = 0; i < NUM_CLIENTS; i++) { Client client = TClients.createBlockingSchedulerClient( sparrowSchedulerAddr.getAddress().getHostAddress(), sparrowSchedulerAddr.getPort(), 60000); clients.add(client); } clients.peek().registerFrontend(app, Network.getIPAddress(new PropertiesConfiguration()) + ":" + listenPort); } public boolean submitJob(String app, List tasks, TUserGroupInfo user) throws TException { return submitRequest(new TSchedulingRequest(app, tasks, user)); } public boolean submitJob(String app, List tasks, TUserGroupInfo user, String description) { TSchedulingRequest request = new TSchedulingRequest(app, tasks, user); request.setDescription(description); return submitRequest(request); } public boolean submitJob(String app, List tasks, TUserGroupInfo user, double probeRatio) throws TException { TSchedulingRequest request = new TSchedulingRequest(app, tasks, user); request.setProbeRatio(probeRatio); return submitRequest(request); } public boolean submitRequest(TSchedulingRequest request) { try { Client client = clients.take(); client.submitJob(request); clients.put(client); } catch (InterruptedException e) { LOG.fatal(e); } catch (TException e) { LOG.error("Thrift exception when submitting job: " + e.getMessage()); return false; } catch (IncompleteRequestException e) { LOG.error(e); } return true; } public void close() { for (int i = 0; i < NUM_CLIENTS; i++) { clients.poll().getOutputProtocol().getTransport().close(); } } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/SparrowConf.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon; /** * Configuration parameters for sparrow. */ public class SparrowConf { // Values: "debug", "info", "warn", "error", "fatal" public final static String LOG_LEVEL = "log_level"; public final static String SCHEDULER_THRIFT_PORT = "scheduler.thrift.port"; public final static String SCHEDULER_THRIFT_THREADS = "scheduler.thrift.threads"; // Listen port for the state store --> scheduler interface public final static String SCHEDULER_STATE_THRIFT_PORT = "scheduler.state.thrift.port"; public final static String SCHEDULER_STATE_THRIFT_THREADS = "scheduler.state.thrift.threads"; /** * Whether the scheduler should cancel outstanding reservations when all of a job's tasks have * been scheduled. Should be set to "true" or "false". */ public final static String CANCELLATION = "cancellation"; public final static boolean DEFAULT_CANCELLATION = true; /* List of ports corresponding to node monitors (backend interface) this daemon is * supposed to run. In most deployment scenarios this will consist of a single port, * or will be left unspecified in favor of the default port. */ public final static String NM_THRIFT_PORTS = "agent.thrift.ports"; /* List of ports corresponding to node monitors (internal interface) this daemon is * supposed to run. In most deployment scenarios this will consist of a single port, * or will be left unspecified in favor of the default port. */ public final static String INTERNAL_THRIFT_PORTS = "internal_agent.thrift.ports"; public final static String NM_THRIFT_THREADS = "agent.thrift.threads"; public final static String INTERNAL_THRIFT_THREADS = "internal_agent.thrift.threads"; /** Type of task scheduler to use on node monitor. Values: "fifo," "round_robin, " "priority." */ public final static String NM_TASK_SCHEDULER_TYPE = "node_monitor.task_scheduler"; public final static String SYSTEM_MEMORY = "system.memory"; public final static int DEFAULT_SYSTEM_MEMORY = 1024; public final static String SYSTEM_CPUS = "system.cpus"; public final static int DEFAULT_SYSTEM_CPUS = 4; // Values: "standalone", "configbased." Only "configbased" works currently. public final static String DEPLYOMENT_MODE = "deployment.mode"; public final static String DEFAULT_DEPLOYMENT_MODE = "production"; /** The ratio of probes used in a scheduling decision to tasks. */ // For requests w/o constraints... public final static String SAMPLE_RATIO = "sample.ratio"; public final static double DEFAULT_SAMPLE_RATIO = 1.05; // For requests w/ constraints... public final static String SAMPLE_RATIO_CONSTRAINED = "sample.ratio.constrained"; public final static int DEFAULT_SAMPLE_RATIO_CONSTRAINED = 2; /** The hostname of this machine. */ public final static String HOSTNAME = "hostname"; /** * Use an invalid default value, so that the "special task set" is only used by those * who know what they're doing. */ public final static int DEFAULT_SPECIAL_TASK_SET_SIZE = -1; // Parameters for static operation. /** Expects a comma-separated list of host:port pairs describing the address of the * internal interface of the node monitors. */ public final static String STATIC_NODE_MONITORS = "static.node_monitors"; public final static String STATIC_APP_NAME = "static.app.name"; public static final String GET_TASK_PORT = "get_task.port"; public final static String SPREAD_EVENLY_TASK_SET_SIZE = "spread_evenly_task_set_size"; public final static int DEFAULT_SPREAD_EVENLY_TASK_SET_SIZE = 1; } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/SparrowDaemon.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon; import joptsimple.OptionParser; import joptsimple.OptionSet; import org.apache.commons.configuration.Configuration; import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Level; import org.apache.log4j.Logger; import edu.berkeley.sparrow.daemon.nodemonitor.NodeMonitorThrift; import edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift; import edu.berkeley.sparrow.daemon.util.Logging; /** * A Sparrow Daemon includes both a scheduler and a node monitor. * The main() method launches a Sparrow daemon. */ public class SparrowDaemon { // Eventually, we'll want to change this to something higher than debug. public final static Level DEFAULT_LOG_LEVEL = Level.DEBUG; public void initialize(Configuration conf) throws Exception { Level logLevel = Level.toLevel(conf.getString(SparrowConf.LOG_LEVEL, ""), DEFAULT_LOG_LEVEL); Logger.getRootLogger().setLevel(logLevel); // Start as many node monitors as specified in config String[] nmPorts = conf.getStringArray(SparrowConf.NM_THRIFT_PORTS); String[] inPorts = conf.getStringArray(SparrowConf.INTERNAL_THRIFT_PORTS); if (nmPorts.length != inPorts.length) { throw new ConfigurationException(SparrowConf.NM_THRIFT_PORTS + " and " + SparrowConf.INTERNAL_THRIFT_PORTS + " not of equal length"); } if (nmPorts.length > 1 && (!conf.getString(SparrowConf.DEPLYOMENT_MODE, "").equals("standalone"))) { throw new ConfigurationException("Mutliple NodeMonitors only allowed " + "in standalone deployment"); } if (nmPorts.length == 0) { (new NodeMonitorThrift()).initialize(conf, NodeMonitorThrift.DEFAULT_NM_THRIFT_PORT, NodeMonitorThrift.DEFAULT_INTERNAL_THRIFT_PORT); } else { for (int i = 0; i < nmPorts.length; i++) { (new NodeMonitorThrift()).initialize(conf, Integer.parseInt(nmPorts[i]), Integer.parseInt(inPorts[i])); } } SchedulerThrift scheduler = new SchedulerThrift(); scheduler.initialize(conf); } public static void main(String[] args) throws Exception { OptionParser parser = new OptionParser(); parser.accepts("c", "configuration file (required)"). withRequiredArg().ofType(String.class); parser.accepts("help", "print help statement"); OptionSet options = parser.parse(args); if (options.has("help") || !options.has("c")) { parser.printHelpOn(System.out); System.exit(-1); } // Set up a simple configuration that logs on the console. BasicConfigurator.configure(); Logging.configureAuditLogging(); String configFile = (String) options.valueOf("c"); Configuration conf = new PropertiesConfiguration(configFile); SparrowDaemon sparrowDaemon = new SparrowDaemon(); sparrowDaemon.initialize(conf); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/StandaloneStateStore.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon; import java.net.InetSocketAddress; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import edu.berkeley.sparrow.daemon.nodemonitor.StandaloneNodeMonitorState; import edu.berkeley.sparrow.daemon.scheduler.StandaloneSchedulerState; /** * When Sparrow is running in standalone mode (single machine) it is * necessary to have a singleton global state store to coordinate data * between {@link StandaloneNodeMonitorState} and * {@link StandaloneSchedulerState}. This class acts as that state store. */ public class StandaloneStateStore { private static final StandaloneStateStore instance = new StandaloneStateStore(); public static StandaloneStateStore getInstance() { return instance; } // appId -> map of app nodes private Map> applications; // Private constructor prevents instantiation from other classes private StandaloneStateStore() { applications = new HashMap>(); } // SOURCE: StandaloneNodeMonitorState public synchronized void registerBackend( String appId, InetSocketAddress nmAddr) { if (!this.applications.containsKey(appId)) { this.applications.put(appId, new HashSet()); } this.applications.get(appId).add(nmAddr); } // SOURCE: StandaloneSchedulerState public synchronized Set getBackends( String appId) { if (applications.containsKey(appId)) { return new HashSet( applications.get(appId)); } else { return new HashSet(); } } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/ConfigNodeMonitorState.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.nodemonitor; import java.net.InetSocketAddress; import java.util.Set; import org.apache.commons.configuration.Configuration; import org.apache.log4j.Logger; import edu.berkeley.sparrow.daemon.SparrowConf; import edu.berkeley.sparrow.daemon.util.ConfigUtil; /*** * A {@link NodeMonitorState} implementation based on a static config file. */ public class ConfigNodeMonitorState implements NodeMonitorState { private static final Logger LOG = Logger.getLogger(ConfigNodeMonitorState.class); private Set nodeMonitors; private String staticAppId; @Override public void initialize(Configuration conf) { nodeMonitors = ConfigUtil.parseBackends(conf); staticAppId = conf.getString(SparrowConf.STATIC_APP_NAME); } @Override public boolean registerBackend(String appId, InetSocketAddress nodeMonitor) { // Verify that the given backend information matches the static configuration. if (!appId.equals(staticAppId)) { LOG.error("Requested to register backend for app " + appId + " but was expecting app " + staticAppId); } else if (!nodeMonitors.contains(nodeMonitor)) { StringBuilder errorMessage = new StringBuilder(); for (InetSocketAddress nodeMonitorAddress : nodeMonitors) { errorMessage.append(nodeMonitorAddress.toString()); } throw new RuntimeException("Address " + nodeMonitor.toString() + " not found among statically configured addreses for app " + appId + " (statically " + "configured addresses include: " + errorMessage.toString()); } return true; } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/FifoTaskScheduler.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.nodemonitor; import java.util.Iterator; import java.util.concurrent.LinkedBlockingQueue; import org.apache.log4j.Logger; /** * This scheduler assumes that backends can execute a fixed number of tasks (equal to * the number of cores on the machine) and uses a FIFO queue to determine the order to launch * tasks whenever outstanding tasks exceed this amount. */ public class FifoTaskScheduler extends TaskScheduler { private final static Logger LOG = Logger.getLogger(FifoTaskScheduler.class); public int maxActiveTasks; public Integer activeTasks; public LinkedBlockingQueue taskReservations = new LinkedBlockingQueue(); public FifoTaskScheduler(int max) { maxActiveTasks = max; activeTasks = 0; } @Override synchronized int handleSubmitTaskReservation(TaskSpec taskReservation) { // This method, cancelTaskReservations(), and handleTaskCompleted() are synchronized to avoid // race conditions between updating activeTasks and taskReservations. if (activeTasks < maxActiveTasks) { if (taskReservations.size() > 0) { String errorMessage = "activeTasks should be less than maxActiveTasks only " + "when no outstanding reservations."; LOG.error(errorMessage); throw new IllegalStateException(errorMessage); } makeTaskRunnable(taskReservation); ++activeTasks; LOG.debug("Making task for request " + taskReservation.requestId + " runnable (" + activeTasks + " of " + maxActiveTasks + " task slots currently filled)"); return 0; } LOG.debug("All " + maxActiveTasks + " task slots filled."); int queuedReservations = taskReservations.size(); try { LOG.debug("Enqueueing task reservation with request id " + taskReservation.requestId + " because all task slots filled. " + queuedReservations + " already enqueued reservations."); taskReservations.put(taskReservation); } catch (InterruptedException e) { LOG.fatal(e); } return queuedReservations; } @Override synchronized int cancelTaskReservations(String requestId) { int numReservationsCancelled = 0; Iterator reservationsIterator = taskReservations.iterator(); while (reservationsIterator.hasNext()) { TaskSpec reservation = reservationsIterator.next(); if (reservation.requestId == requestId) { reservationsIterator.remove(); ++numReservationsCancelled; } } return numReservationsCancelled; } @Override protected void handleTaskFinished(String requestId, String taskId) { attemptTaskLaunch(requestId, taskId); } @Override protected void handleNoTaskForReservation(TaskSpec taskSpec) { attemptTaskLaunch(taskSpec.previousRequestId, taskSpec.previousTaskId); } /** * Attempts to launch a new task. * * The parameters {@code lastExecutedRequestId} and {@code lastExecutedTaskId} are used purely * for logging purposes, to determine how long the node monitor spends trying to find a new * task to execute. This method needs to be synchronized to prevent a race condition with * {@link handleSubmitTaskReservation}. */ private synchronized void attemptTaskLaunch( String lastExecutedRequestId, String lastExecutedTaskId) { TaskSpec reservation = taskReservations.poll(); if (reservation != null) { reservation.previousRequestId = lastExecutedRequestId; reservation.previousTaskId = lastExecutedTaskId; makeTaskRunnable(reservation); } else { activeTasks -= 1; } } @Override int getMaxActiveTasks() { return maxActiveTasks; } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/NoQueueTaskScheduler.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.nodemonitor; /** * A {@link TaskScheduler} which makes tasks instantly available for launch. * * This does not perform any resource management or queuing. It can be used for * applications which do not want Sparrow to perform any explicit resource management * but still want Sparrow to launch tasks. */ public class NoQueueTaskScheduler extends TaskScheduler { @Override int handleSubmitTaskReservation(TaskSpec taskReservation) { // Make this task instantly runnable makeTaskRunnable(taskReservation); return 0; } @Override int cancelTaskReservations(String requestId) { // Do nothing. No reservations cancelled. return 0; } @Override protected void handleTaskFinished(String requestId, String taskId) { // Do nothing. } @Override protected void handleNoTaskForReservation(TaskSpec taskSpec) { // Do nothing. } @Override int getMaxActiveTasks() { return -1; } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/NodeMonitor.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.nodemonitor; import java.io.IOException; import java.net.InetSocketAddress; import java.net.UnknownHostException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.concurrent.ConcurrentMap; import org.apache.commons.configuration.Configuration; import org.apache.log4j.Logger; import org.apache.thrift.TException; import org.apache.thrift.async.AsyncMethodCallback; import com.google.common.collect.Maps; import edu.berkeley.sparrow.daemon.SparrowConf; import edu.berkeley.sparrow.daemon.util.Logging; import edu.berkeley.sparrow.daemon.util.Network; import edu.berkeley.sparrow.daemon.util.Resources; import edu.berkeley.sparrow.daemon.util.ThriftClientPool; import edu.berkeley.sparrow.thrift.SchedulerService; import edu.berkeley.sparrow.thrift.SchedulerService.AsyncClient; import edu.berkeley.sparrow.thrift.SchedulerService.AsyncClient.sendFrontendMessage_call; import edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest; import edu.berkeley.sparrow.thrift.TFullTaskId; /** * A Node Monitor which is responsible for communicating with application * backends. This class is wrapped by multiple thrift servers, so it may * be concurrently accessed when handling multiple function calls * simultaneously. */ public class NodeMonitor { private final static Logger LOG = Logger.getLogger(NodeMonitor.class); private final static Logger AUDIT_LOG = Logging.getAuditLogger(TaskScheduler.class); private static NodeMonitorState state; private HashMap appSockets = new HashMap(); private HashMap> appTasks = new HashMap>(); // Map to scheduler socket address for each request id. private ConcurrentMap requestSchedulers = Maps.newConcurrentMap(); private ThriftClientPool schedulerClientPool = new ThriftClientPool( new ThriftClientPool.SchedulerServiceMakerFactory()); private TaskScheduler scheduler; private TaskLauncherService taskLauncherService; private String ipAddress; public void initialize(Configuration conf, int nodeMonitorInternalPort) throws UnknownHostException { String mode = conf.getString(SparrowConf.DEPLYOMENT_MODE, "unspecified"); if (mode.equals("standalone")) { state = new StandaloneNodeMonitorState(); } else if (mode.equals("configbased")) { state = new ConfigNodeMonitorState(); } else { throw new RuntimeException("Unsupported deployment mode: " + mode); } try { state.initialize(conf); } catch (IOException e) { LOG.fatal("Error initializing node monitor state.", e); } int mem = Resources.getSystemMemoryMb(conf); LOG.info("Using memory allocation: " + mem); ipAddress = Network.getIPAddress(conf); int cores = Resources.getSystemCPUCount(conf); LOG.info("Using core allocation: " + cores); String task_scheduler_type = conf.getString(SparrowConf.NM_TASK_SCHEDULER_TYPE, "fifo"); if (task_scheduler_type.equals("round_robin")) { scheduler = new RoundRobinTaskScheduler(cores); } else if (task_scheduler_type.equals("fifo")) { scheduler = new FifoTaskScheduler(cores); } else if (task_scheduler_type.equals("priority")) { scheduler = new PriorityTaskScheduler(cores); } else { throw new RuntimeException("Unsupported task scheduler type: " + mode); } scheduler.initialize(conf, nodeMonitorInternalPort); taskLauncherService = new TaskLauncherService(); taskLauncherService.initialize(conf, scheduler, nodeMonitorInternalPort); } /** * Registers the backend with assumed 0 load, and returns true if successful. * Returns false if the backend was already registered. */ public boolean registerBackend(String appId, InetSocketAddress nmAddr, InetSocketAddress backendAddr) { LOG.debug(Logging.functionCall(appId, nmAddr, backendAddr)); if (appSockets.containsKey(appId)) { LOG.warn("Attempt to re-register app " + appId); return false; } appSockets.put(appId, backendAddr); appTasks.put(appId, new ArrayList()); return state.registerBackend(appId, nmAddr); } /** * Account for tasks which have finished. */ public void tasksFinished(List tasks) { LOG.debug(Logging.functionCall(tasks)); scheduler.tasksFinished(tasks); } public boolean enqueueTaskReservations(TEnqueueTaskReservationsRequest request) { LOG.debug(Logging.functionCall(request)); AUDIT_LOG.info(Logging.auditEventString("node_monitor_enqueue_task_reservation", ipAddress, request.requestId)); LOG.info("Received enqueue task reservation request from " + ipAddress + " for request " + request.requestId); InetSocketAddress schedulerAddress = new InetSocketAddress( request.getSchedulerAddress().getHost(), request.getSchedulerAddress().getPort()); requestSchedulers.put(request.getRequestId(), schedulerAddress); InetSocketAddress socket = appSockets.get(request.getAppId()); if (socket == null) { LOG.error("No socket stored for " + request.getAppId() + " (never registered?). " + "Can't launch task."); return false; } scheduler.submitTaskReservations(request, socket); return true; } public void cancelTaskReservations(String requestId) { int numReservationsCancelled = scheduler.cancelTaskReservations(requestId); AUDIT_LOG.debug(Logging.auditEventString( "node_monitor_cancellation", ipAddress, requestId, numReservationsCancelled)); } private class sendFrontendMessageCallback implements AsyncMethodCallback { private InetSocketAddress frontendSocket; private AsyncClient client; public sendFrontendMessageCallback(InetSocketAddress socket, AsyncClient client) { frontendSocket = socket; this.client = client; } public void onComplete(sendFrontendMessage_call response) { try { schedulerClientPool.returnClient(frontendSocket, client); } catch (Exception e) { LOG.error(e); } } public void onError(Exception exception) { try { schedulerClientPool.returnClient(frontendSocket, client); } catch (Exception e) { LOG.error(e); } LOG.error(exception); } } public void sendFrontendMessage(String app, TFullTaskId taskId, int status, ByteBuffer message) { LOG.debug(Logging.functionCall(app, taskId, message)); InetSocketAddress scheduler = requestSchedulers.get(taskId.requestId); if (scheduler == null) { LOG.error("Did not find any scheduler info for request: " + taskId); return; } try { AsyncClient client = schedulerClientPool.borrowClient(scheduler); client.sendFrontendMessage(app, taskId, status, message, new sendFrontendMessageCallback(scheduler, client)); LOG.debug("finished sending message"); } catch (IOException e) { LOG.error(e); } catch (TException e) { LOG.error(e); } catch (Exception e) { LOG.error(e); } } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/NodeMonitorState.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.nodemonitor; import java.io.IOException; import java.net.InetSocketAddress; import org.apache.commons.configuration.Configuration; public interface NodeMonitorState { /** * Initialize state storage. This should open connections to any external * services if required. * @throws IOException */ public void initialize(Configuration conf) throws IOException; /** * Register a backend identified by {@code appId} which can be reached via * a NodeMonitor running at the given address. The node is assumed to have * resources given by {@code capacity}. */ public boolean registerBackend(String appId, InetSocketAddress nodeMonitor); } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/NodeMonitorThrift.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.nodemonitor; import java.io.IOException; import java.net.InetAddress; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.util.List; import org.apache.commons.configuration.Configuration; import org.apache.thrift.TException; import com.google.common.base.Optional; import edu.berkeley.sparrow.daemon.SparrowConf; import edu.berkeley.sparrow.daemon.util.Serialization; import edu.berkeley.sparrow.daemon.util.TServers; import edu.berkeley.sparrow.thrift.InternalService; import edu.berkeley.sparrow.thrift.NodeMonitorService; import edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest; import edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest; import edu.berkeley.sparrow.thrift.TFullTaskId; /** * This class extends the thrift Sparrow node monitor interface. It wraps the * {@link NodeMonitor} class and delegates most calls to that class. */ public class NodeMonitorThrift implements NodeMonitorService.Iface, InternalService.Iface { // Defaults if not specified by configuration public final static int DEFAULT_NM_THRIFT_PORT = 20501; public final static int DEFAULT_NM_THRIFT_THREADS = 32; public final static int DEFAULT_INTERNAL_THRIFT_PORT = 20502; public final static int DEFAULT_INTERNAL_THRIFT_THREADS = 8; private NodeMonitor nodeMonitor = new NodeMonitor(); // The socket addr (ip:port) where we listen for requests from other Sparrow daemons. // Used when registering backends with the state store. private InetSocketAddress internalAddr; /** * Initialize this thrift service. * * This spawns 2 multi-threaded thrift servers, one exposing the app-facing * agent service and the other exposing the internal-facing agent service, * and listens for requests to both servers. We require explicit specification of the * ports for these respective interfaces, since they cannot always be determined from * within this class under certain configurations (e.g. a config file specifies * multiple NodeMonitors). */ public void initialize(Configuration conf, int nmPort, int internalPort) throws IOException { nodeMonitor.initialize(conf, internalPort); // Setup application-facing agent service. NodeMonitorService.Processor processor = new NodeMonitorService.Processor(this); int threads = conf.getInt(SparrowConf.NM_THRIFT_THREADS, DEFAULT_NM_THRIFT_THREADS); TServers.launchThreadedThriftServer(nmPort, threads, processor); // Setup internal-facing agent service. InternalService.Processor internalProcessor = new InternalService.Processor(this); int internalThreads = conf.getInt( SparrowConf.INTERNAL_THRIFT_THREADS, DEFAULT_INTERNAL_THRIFT_THREADS); TServers.launchThreadedThriftServer(internalPort, internalThreads, internalProcessor); internalAddr = new InetSocketAddress(InetAddress.getLocalHost(), internalPort); } @Override public boolean registerBackend(String app, String backendSocket) throws TException { Optional backendAddr = Serialization.strToSocket(backendSocket); if (!backendAddr.isPresent()) { return false; // TODO: maybe we should throw some exception here? } return nodeMonitor.registerBackend(app, internalAddr, backendAddr.get()); } @Override public void sendFrontendMessage(String app, TFullTaskId taskId, int status, ByteBuffer message) throws TException { nodeMonitor.sendFrontendMessage(app, taskId, status, message); } @Override public void tasksFinished(List tasks) throws TException { nodeMonitor.tasksFinished(tasks); } @Override public boolean enqueueTaskReservations(TEnqueueTaskReservationsRequest request) throws TException { return nodeMonitor.enqueueTaskReservations(request); } @Override public void cancelTaskReservations(TCancelTaskReservationsRequest request) throws TException { nodeMonitor.cancelTaskReservations(request.requestId); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/PriorityTaskScheduler.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.nodemonitor; import java.util.Iterator; import java.util.LinkedList; import java.util.Map.Entry; import java.util.Queue; import java.util.TreeMap; import org.apache.log4j.Logger; import com.google.common.collect.Maps; /** * A {@link TaskScheduler} that launches tasks in strict priority order. Priorities are * integral values specified in the scheduling request. * * TODO: Would be better to pre-configure priorities -- users shouldn't be able to specify * whatever priority they want in the scheduling request. */ public class PriorityTaskScheduler extends TaskScheduler { private final static Logger LOG = Logger.getLogger(PriorityTaskScheduler.class); /** Queue of tasks of each priority. */ private TreeMap> priorityQueues = Maps.newTreeMap(); int numQueuedReservations; public int maxActiveTasks; public Integer activeTasks; public PriorityTaskScheduler(int maxActiveTasks) { this.maxActiveTasks = maxActiveTasks; activeTasks = 0; numQueuedReservations = 0; } @Override synchronized int handleSubmitTaskReservation(TaskSpec taskReservation) { /* Because of the need to check the free resources and then, depending on the result, start a * new task, this method must be synchronized. */ int priority = taskReservation.user.getPriority(); if (!priorityQueues.containsKey(priority)) { priorityQueues.put(priority, new LinkedList()); } if (activeTasks < maxActiveTasks) { if (numQueuedReservations > 0) { String errorMessage = "activeTasks should be less than maxActiveTasks only " + "when no outstanding reservations."; LOG.error(errorMessage); throw new IllegalStateException(errorMessage); } makeTaskRunnable(taskReservation); ++activeTasks; LOG.debug("Making task for request " + taskReservation.requestId + " with priority " + priority + " runnable (" + activeTasks + " of " + maxActiveTasks + " task slots currently filled)"); return 0; } LOG.debug("All " + maxActiveTasks + " task slots filled."); Queue reservations = priorityQueues.get(priority); LOG.debug("Adding reservation for priority " + priority + ". " + reservations.size() + " reservations already queued for that priority, and " + numQueuedReservations + " total reservations queued."); reservations.add(taskReservation); return ++numQueuedReservations; } @Override synchronized int cancelTaskReservations(String requestId) { int numReservationsCancelled = 0; for (Queue taskSpecs : priorityQueues.values()) { Iterator iterator = taskSpecs.iterator(); while (iterator.hasNext()) { TaskSpec reservation = iterator.next(); if (reservation.requestId == requestId) { ++numReservationsCancelled; iterator.remove(); } } } return numReservationsCancelled; } @Override protected void handleTaskFinished(String requestId, String taskId) { attemptTaskLaunch(requestId, taskId); } @Override protected void handleNoTaskForReservation(TaskSpec taskSpec) { attemptTaskLaunch(taskSpec.previousRequestId, taskSpec.previousTaskId); } /** * Attempts to launch a new task. * * The parameters {@code lastExecutedRequestId} and {@code lastExecutedTaskId} are used purely * for logging purposes, to determine how long the node monitor spends trying to find a new * task to execute. This method needs to be synchronized to prevent a race condition with * {@link handleSubmitTaskReservation}. */ private synchronized void attemptTaskLaunch( String lastExecutedRequestId, String lastExecutedTaskId) { if (numQueuedReservations != 0) { // Launch a task for the lowest valued priority with queued tasks. for (Entry> entry : priorityQueues.entrySet()) { TaskSpec nextTask = entry.getValue().poll(); if (nextTask != null) { LOG.debug("Launching task for request " + nextTask.requestId + " (priority " + entry.getKey() + ")"); nextTask.previousRequestId = lastExecutedRequestId; nextTask.previousTaskId = lastExecutedTaskId; makeTaskRunnable(nextTask); numQueuedReservations--; return; } } String errorMessage = ("numQueuedReservations=" + numQueuedReservations + " but no queued tasks found."); throw new IllegalStateException(errorMessage); } else { LOG.debug("No queued tasks, so not launching anything."); activeTasks -= 1; } } @Override int getMaxActiveTasks() { return maxActiveTasks; } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/RoundRobinTaskScheduler.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.nodemonitor; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.Queue; import org.apache.log4j.Logger; import com.google.common.collect.Maps; /** * A {@link TaskScheduler} which round-robins requests over per-user queues. * * When a user is allocated a "slot", this scheduler attempts to fetch a task for the next * queued reservation. If a task for the given reservation is not available, the scheduler will * try to launch anothe task for the same user. * * NOTE: This currently round-robins over users, rather than applications. Not sure * what we want here going forward. */ public class RoundRobinTaskScheduler extends TaskScheduler { private final static Logger LOG = Logger.getLogger(RoundRobinTaskScheduler.class); private HashMap> userQueues = Maps.newHashMap(); int numQueuedReservations; public int maxActiveTasks; public Integer activeTasks; private ArrayList users = new ArrayList(); private int currentIndex = 0; // Round robin index, always used (mod n) where n is // the number of users. public RoundRobinTaskScheduler(int maxActiveTasks) { this.maxActiveTasks = maxActiveTasks; activeTasks = 0; numQueuedReservations = 0; } @Override synchronized int handleSubmitTaskReservation(TaskSpec taskReservation) { /* Because of the need to check the free resources and then, depending on the result, start a * new task, this method must be synchronized. */ String user = taskReservation.user.getUser(); if (!userQueues.containsKey(user)) { users.add(user); userQueues.put(user, new LinkedList()); } if (activeTasks < maxActiveTasks) { if (numQueuedReservations > 0) { String errorMessage = "activeTasks should be less than maxActiveTasks only " + "when no outstanding reservations."; LOG.error(errorMessage); throw new IllegalStateException(errorMessage); } makeTaskRunnable(taskReservation); // Set current Index to immediately after this user, to reflect the fact that a task for this // user was the most recent one to be given a chance to run. currentIndex = (users.indexOf(taskReservation.user.getUser()) + 1) % users.size(); ++activeTasks; LOG.debug("Making task for request " + taskReservation.requestId + " runnable (" + activeTasks + " of " + maxActiveTasks + " task slots currently filled)"); return 0; } LOG.debug("All " + maxActiveTasks + " task slots filled."); Queue reservations = userQueues.get(user); LOG.debug("Adding reservation for user " + user + ". " + reservations.size() + " reservations already queued for user, and " + numQueuedReservations + " total reservations queued."); reservations.add(taskReservation); return ++numQueuedReservations; } @Override synchronized int cancelTaskReservations(String requestId) { int numReservationsCancelled = 0; for (Queue taskReservations : userQueues.values()) { Iterator iterator = taskReservations.iterator(); while (iterator.hasNext()) { TaskSpec reservation = iterator.next(); if (reservation.requestId == requestId) { iterator.remove(); ++numReservationsCancelled; } } } return numReservationsCancelled; } @Override protected void handleTaskFinished(String requestId, String taskId) { attemptTaskLaunch(requestId, taskId); } @Override protected void handleNoTaskForReservation(TaskSpec taskSpec) { if (attemptTaskLaunchForUser( taskSpec.previousRequestId, taskSpec.previousTaskId, taskSpec.user.getUser())) { // Don't update currentIndex! Trying to launch another task for a user whose previous // reservations couldn't be fulfilled shouldn't affect round robin ordering. return; } attemptTaskLaunch(taskSpec.previousRequestId, taskSpec.previousTaskId); } /** * Attempts to launch a new task, using round-robin ordering to determine the user. * * The parameters {@code lastExecutedRequestId} and {@code lastExecutedTaskId} are used purely * for logging purposes, to determine how long the node monitor spends trying to find a new * task to execute. This method must be synchronized to prevent a race condition with * {@link handleSubmitTaskReservation}. */ private synchronized void attemptTaskLaunch(String lastExecutedRequestId, String lastExecutedTaskId) { if (numQueuedReservations != 0) { /* Scan through the list of users (starting at currentIndex) and find the first * one with a pending task. If we find a pending task, make that task runnable * and update the round robin index. * * Note that this implementation assumes that we can take an arbitrary task and, * by virtue of a task having just finished, have enough resources to execute it. * This makes sense for scheduling similarly sized tasks (e.g. just scheduling cores) * but will not be the case if tasks take different amounts of resources. */ for (int offset = 0; offset < users.size(); offset++) { String user = users.get((currentIndex + offset) % users.size()); if (attemptTaskLaunchForUser(lastExecutedRequestId, lastExecutedTaskId, user)) { currentIndex = (currentIndex + offset + 1) % users.size(); return; } } String errorMessage = ("numQueuedReservations=" + numQueuedReservations + " but no queued tasks found."); throw new IllegalStateException(errorMessage); } else { LOG.debug("No queued tasks, so not launching anything."); activeTasks -= 1; } } /** * Launches a task for the given user, if that user has any tasks queued. * * Returns true if a task was launched for the given user. This method must be synchronized to * avoid concurrent concurrent modification to {@link userQueues} in * {@link handleSubmitTaskReservation}. */ private synchronized boolean attemptTaskLaunchForUser(String lastExecutedTaskRequestId, String lastExecutedTaskId, String user) { Queue considering = userQueues.get(user); TaskSpec nextTask = considering.poll(); if (nextTask != null) { LOG.debug("Task for user " + user + ", request " + nextTask.requestId + " now runnable."); nextTask.previousRequestId = lastExecutedTaskRequestId; nextTask.previousTaskId = lastExecutedTaskId; makeTaskRunnable(nextTask); numQueuedReservations--; /* Never remove users from the queue, because it will make currentIndex no longer right, * and we don't expect user churn right now. */ return true; } LOG.debug("Skipping user " + user + " that has no runnable tasks."); return false; } @Override int getMaxActiveTasks() { return maxActiveTasks; } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/StandaloneNodeMonitorState.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.nodemonitor; import java.net.InetSocketAddress; import org.apache.commons.configuration.Configuration; import edu.berkeley.sparrow.daemon.StandaloneStateStore; /** * A {@link NodeMonitorState} implementation for use in standalone mode. */ public class StandaloneNodeMonitorState implements NodeMonitorState { private StandaloneStateStore stateStore = StandaloneStateStore.getInstance(); @Override public void initialize(Configuration conf) { // Nothing required } @Override public boolean registerBackend(String appId, InetSocketAddress nmAddr) { stateStore.registerBackend(appId, nmAddr); return true; } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/TaskLauncherService.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.nodemonitor; import java.io.IOException; import java.net.InetSocketAddress; import java.util.HashMap; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import org.apache.commons.configuration.Configuration; import org.apache.log4j.Logger; import org.apache.thrift.TException; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import edu.berkeley.sparrow.daemon.nodemonitor.TaskScheduler.TaskSpec; import edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift; import edu.berkeley.sparrow.daemon.util.Logging; import edu.berkeley.sparrow.daemon.util.Network; import edu.berkeley.sparrow.daemon.util.Resources; import edu.berkeley.sparrow.daemon.util.TClients; import edu.berkeley.sparrow.thrift.BackendService; import edu.berkeley.sparrow.thrift.GetTaskService; import edu.berkeley.sparrow.thrift.TFullTaskId; import edu.berkeley.sparrow.thrift.THostPort; import edu.berkeley.sparrow.thrift.TTaskLaunchSpec; /** * TaskLauncher service consumes TaskReservations produced by {@link TaskScheduler.getNextTask}. * For each TaskReservation, the TaskLauncherService attempts to fetch the task specification from * the scheduler that sent the reservation using the {@code getTask} RPC; if it successfully * fetches a task, it launches the task on the appropriate backend. * * TaskLauncherService uses multiple threads to launch tasks. Each thread keeps a client for * each scheduler, and a client for each application backend, and the TaskLauncherService uses * a number of threads equal to the number of slots available for running tasks on the machine. */ public class TaskLauncherService { private final static Logger LOG = Logger.getLogger(TaskLauncherService.class); private final static Logger AUDIT_LOG = Logging.getAuditLogger(TaskLauncherService.class); /* The number of threads used by the service. */ private int numThreads; private THostPort nodeMonitorInternalAddress; private TaskScheduler scheduler; /** A runnable that spins in a loop asking for tasks to launch and launching them. */ private class TaskLaunchRunnable implements Runnable { /** Client to use to communicate with each scheduler (indexed by scheduler hostname). */ private HashMap schedulerClients = Maps.newHashMap(); /** Client to use to communicate with each application backend (indexed by backend address). */ private HashMap backendClients = Maps.newHashMap(); @Override public void run() { while (true) { TaskSpec task = scheduler.getNextTask(); // blocks until task is ready List taskLaunchSpecs = executeGetTaskRpc(task); AUDIT_LOG.info(Logging.auditEventString("node_monitor_get_task_complete", task.requestId, nodeMonitorInternalAddress.getHost())); if (taskLaunchSpecs.isEmpty()) { LOG.debug("Didn't receive a task for request " + task.requestId); scheduler.noTaskForReservation(task); continue; } if (taskLaunchSpecs.size() > 1) { LOG.warn("Received " + taskLaunchSpecs + " task launch specifications; ignoring all but the first one."); } task.taskSpec = taskLaunchSpecs.get(0); LOG.debug("Received task for request " + task.requestId + ", task " + task.taskSpec.getTaskId()); // Launch the task on the backend. AUDIT_LOG.info(Logging.auditEventString("node_monitor_task_launch", task.requestId, nodeMonitorInternalAddress.getHost(), task.taskSpec.getTaskId(), task.previousRequestId, task.previousTaskId)); executeLaunchTaskRpc(task); LOG.debug("Launched task " + task.taskSpec.getTaskId() + " for request " + task.requestId + " on application backend at system time " + System.currentTimeMillis()); } } /** Uses a getTask() RPC to get the task specification from the appropriate scheduler. */ private List executeGetTaskRpc(TaskSpec task) { String schedulerAddress = task.schedulerAddress.getAddress().getHostAddress(); if (!schedulerClients.containsKey(schedulerAddress)) { try { schedulerClients.put(schedulerAddress, TClients.createBlockingGetTaskClient( task.schedulerAddress.getAddress().getHostAddress(), SchedulerThrift.DEFAULT_GET_TASK_PORT)); } catch (IOException e) { LOG.error("Error creating thrift client: " + e.getMessage()); List emptyTaskLaunchSpecs = Lists.newArrayList(); return emptyTaskLaunchSpecs; } } GetTaskService.Client getTaskClient = schedulerClients.get(schedulerAddress); long startTimeMillis = System.currentTimeMillis(); long startGCCount = Logging.getGCCount(); LOG.debug("Attempting to get task for request " + task.requestId); AUDIT_LOG.debug(Logging.auditEventString("node_monitor_get_task_launch", task.requestId, nodeMonitorInternalAddress.getHost())); List taskLaunchSpecs; try { taskLaunchSpecs = getTaskClient.getTask(task.requestId, nodeMonitorInternalAddress); } catch (TException e) { LOG.error("Error when launching getTask RPC:" + e.getMessage()); List emptyTaskLaunchSpecs = Lists.newArrayList(); return emptyTaskLaunchSpecs; } long rpcTime = System.currentTimeMillis() - startTimeMillis; long numGarbageCollections = Logging.getGCCount() - startGCCount; LOG.debug("GetTask() RPC for request " + task.requestId + " completed in " + rpcTime + "ms (" + numGarbageCollections + "GCs occured during RPC)"); return taskLaunchSpecs; } /** Executes an RPC to launch a task on an application backend. */ private void executeLaunchTaskRpc(TaskSpec task) { if (!backendClients.containsKey(task.appBackendAddress)) { try { backendClients.put(task.appBackendAddress, TClients.createBlockingBackendClient(task.appBackendAddress)); } catch (IOException e) { LOG.error("Error creating thrift client: " + e.getMessage()); return; } } BackendService.Client backendClient = backendClients.get(task.appBackendAddress); THostPort schedulerHostPort = Network.socketAddressToThrift(task.schedulerAddress); TFullTaskId taskId = new TFullTaskId(task.taskSpec.getTaskId(), task.requestId, task.appId, schedulerHostPort); try { backendClient.launchTask(task.taskSpec.bufferForMessage(), taskId, task.user); } catch (TException e) { LOG.error("Unable to launch task on backend " + task.appBackendAddress + ":" + e); } } } public void initialize(Configuration conf, TaskScheduler scheduler, int nodeMonitorPort) { numThreads = scheduler.getMaxActiveTasks(); if (numThreads <= 0) { // If the scheduler does not enforce a maximum number of tasks, just use a number of // threads equal to the number of cores. numThreads = Resources.getSystemCPUCount(conf); } this.scheduler = scheduler; nodeMonitorInternalAddress = new THostPort(Network.getIPAddress(conf), nodeMonitorPort); ExecutorService service = Executors.newFixedThreadPool(numThreads); for (int i = 0; i < numThreads; i++) { service.submit(new TaskLaunchRunnable()); } } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/nodemonitor/TaskScheduler.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.nodemonitor; import java.net.InetSocketAddress; import java.util.List; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import org.apache.commons.configuration.Configuration; import org.apache.log4j.Logger; import edu.berkeley.sparrow.daemon.util.Logging; import edu.berkeley.sparrow.daemon.util.Network; import edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest; import edu.berkeley.sparrow.thrift.TFullTaskId; import edu.berkeley.sparrow.thrift.TTaskLaunchSpec; import edu.berkeley.sparrow.thrift.TUserGroupInfo; /** * A TaskScheduler is a buffer that holds task reservations until an application backend is * available to run the task. When a backend is ready, the TaskScheduler requests the task * from the {@link Scheduler} that submitted the reservation. * * Each scheduler will implement a different policy determining when to launch tasks. * * Schedulers are required to be thread safe, as they will be accessed concurrently from * multiple threads. */ public abstract class TaskScheduler { protected class TaskSpec { public String appId; public TUserGroupInfo user; public String requestId; public InetSocketAddress schedulerAddress; public InetSocketAddress appBackendAddress; /** * ID of the task that previously ran in the slot this task is using. Used * to track how long it takes to fill an empty slot on a slave. Empty if this task was launched * immediately, because there were empty slots available on the slave. Filled in when * the task is launched. */ public String previousRequestId; public String previousTaskId; /** Filled in after the getTask() RPC completes. */ public TTaskLaunchSpec taskSpec; public TaskSpec(TEnqueueTaskReservationsRequest request, InetSocketAddress appBackendAddress) { appId = request.getAppId(); user = request.getUser(); requestId = request.getRequestId(); schedulerAddress = new InetSocketAddress(request.getSchedulerAddress().getHost(), request.getSchedulerAddress().getPort()); this.appBackendAddress = appBackendAddress; previousRequestId = ""; previousTaskId = ""; } } private final static Logger LOG = Logger.getLogger(TaskScheduler.class); private final static Logger AUDIT_LOG = Logging.getAuditLogger(TaskScheduler.class); private String ipAddress; protected Configuration conf; private final BlockingQueue runnableTaskQueue = new LinkedBlockingQueue(); /** Initialize the task scheduler, passing it the current available resources * on the machine. */ void initialize(Configuration conf, int nodeMonitorPort) { this.conf = conf; this.ipAddress = Network.getIPAddress(conf); } /** * Get the next task available for launching. This will block until a task is available. */ TaskSpec getNextTask() { TaskSpec task = null; try { task = runnableTaskQueue.take(); } catch (InterruptedException e) { LOG.fatal(e); } return task; } /** * Returns the current number of runnable tasks (for testing). */ int runnableTasks() { return runnableTaskQueue.size(); } void tasksFinished(List finishedTasks) { for (TFullTaskId t : finishedTasks) { AUDIT_LOG.info(Logging.auditEventString("task_completed", t.getRequestId(), t.getTaskId())); handleTaskFinished(t.getRequestId(), t.getTaskId()); } } void noTaskForReservation(TaskSpec taskReservation) { AUDIT_LOG.info(Logging.auditEventString("node_monitor_get_task_no_task", taskReservation.requestId, taskReservation.previousRequestId, taskReservation.previousTaskId)); handleNoTaskForReservation(taskReservation); } protected void makeTaskRunnable(TaskSpec task) { try { LOG.debug("Putting reservation for request " + task.requestId + " in runnable queue"); runnableTaskQueue.put(task); } catch (InterruptedException e) { LOG.fatal("Unable to add task to runnable queue: " + e.getMessage()); } } public synchronized void submitTaskReservations(TEnqueueTaskReservationsRequest request, InetSocketAddress appBackendAddress) { for (int i = 0; i < request.getNumTasks(); ++i) { LOG.debug("Creating reservation " + i + " for request " + request.getRequestId()); TaskSpec reservation = new TaskSpec(request, appBackendAddress); int queuedReservations = handleSubmitTaskReservation(reservation); AUDIT_LOG.info(Logging.auditEventString("reservation_enqueued", ipAddress, request.requestId, queuedReservations)); } } // TASK SCHEDULERS MUST IMPLEMENT THE FOLLOWING. /** * Handles a task reservation. Returns the number of queued reservations. */ abstract int handleSubmitTaskReservation(TaskSpec taskReservation); /** * Cancels all task reservations with the given request id. Returns the number of task * reservations cancelled. */ abstract int cancelTaskReservations(String requestId); /** * Handles the completion of a task that has finished executing. */ protected abstract void handleTaskFinished(String requestId, String taskId); /** * Handles the case when the node monitor tried to launch a task for a reservation, but * the corresponding scheduler didn't return a task (typically because all of the corresponding * job's tasks have been launched). */ protected abstract void handleNoTaskForReservation(TaskSpec taskSpec); /** * Returns the maximum number of active tasks allowed (the number of slots). * * -1 signals that the scheduler does not enforce a maximum number of active tasks. */ abstract int getMaxActiveTasks(); } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/scheduler/CancellationService.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.scheduler; import java.net.InetSocketAddress; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import org.apache.log4j.Logger; import org.apache.thrift.async.AsyncMethodCallback; import edu.berkeley.sparrow.daemon.util.ThriftClientPool; import edu.berkeley.sparrow.thrift.InternalService; import edu.berkeley.sparrow.thrift.InternalService.AsyncClient; import edu.berkeley.sparrow.thrift.InternalService.AsyncClient.cancelTaskReservations_call; import edu.berkeley.sparrow.thrift.TCancelTaskReservationsRequest; import edu.berkeley.sparrow.thrift.THostPort; public class CancellationService implements Runnable { private ThriftClientPool clientPool; private final BlockingQueue cancellationQueue; private final static Logger LOG = Logger.getLogger(CancellationService.class); private class Cancellation { public String requestId; public InetSocketAddress nodeMonitorAddress; public Cancellation (String requestId, InetSocketAddress nodeMonitorAddress) { this.requestId = requestId; this.nodeMonitorAddress = nodeMonitorAddress; } } public CancellationService(ThriftClientPool clientPool) { this.clientPool = clientPool; this.cancellationQueue = new LinkedBlockingQueue(); } public void addCancellation(String requestId, THostPort nodeMonitorAddress) { InetSocketAddress socketAddress = new InetSocketAddress( nodeMonitorAddress.host, nodeMonitorAddress.port); this.cancellationQueue.add(new Cancellation(requestId, socketAddress)); } public void run() { while (true) { Cancellation cancellation = null; try { cancellation = cancellationQueue.take(); } catch (InterruptedException e) { LOG.fatal(e); } try { InternalService.AsyncClient client = clientPool.borrowClient( cancellation.nodeMonitorAddress); LOG.debug("Cancelling tasks for request " + cancellation.requestId + " on node " + cancellation.nodeMonitorAddress); client.cancelTaskReservations( new TCancelTaskReservationsRequest(cancellation.requestId), new CancelTaskReservationsCallback(cancellation.nodeMonitorAddress)); } catch (Exception e) { LOG.error("Error cancelling request " + cancellation.requestId + " on node " + cancellation.nodeMonitorAddress+ ": " + e.getMessage()); } } } /** A callback for CancelTaskReservations() RPCs that returns the client to the client pool. */ private class CancelTaskReservationsCallback implements AsyncMethodCallback { InetSocketAddress nodeMonitorAddress; public CancelTaskReservationsCallback(InetSocketAddress nodeMonitorAddress) { this.nodeMonitorAddress = nodeMonitorAddress; } @Override public void onComplete(cancelTaskReservations_call response) { try { clientPool.returnClient(nodeMonitorAddress, (AsyncClient) response.getClient()); } catch (Exception e) { LOG.error("Error returning client to node monitor client pool: " + e); } } @Override public void onError(Exception exception) { LOG.error("Error executing cancelTaskReservations RPC: " + exception); } } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/scheduler/ConfigSchedulerState.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.scheduler; import java.net.InetSocketAddress; import java.util.Set; import org.apache.commons.configuration.Configuration; import org.apache.log4j.Logger; import edu.berkeley.sparrow.daemon.SparrowConf; import edu.berkeley.sparrow.daemon.util.ConfigUtil; /** * Scheduler state that operates based on a static configuration file. */ public class ConfigSchedulerState implements SchedulerState { private static final Logger LOG = Logger.getLogger(ConfigSchedulerState.class); Set backends; private Configuration conf; @Override public void initialize(Configuration conf) { backends = ConfigUtil.parseBackends(conf); this.conf = conf; } @Override public boolean watchApplication(String appId) { if (!appId.equals(conf.getString(SparrowConf.STATIC_APP_NAME))) { LOG.warn("Requested watch for app " + appId + " but was expecting app " + conf.getString(SparrowConf.STATIC_APP_NAME)); } return true; } @Override public Set getBackends(String appId) { if (!appId.equals(conf.getString(SparrowConf.STATIC_APP_NAME))) { LOG.warn("Requested backends for app " + appId + " but was expecting app " + conf.getString(SparrowConf.STATIC_APP_NAME)); } return backends; } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/scheduler/ConstrainedTaskPlacer.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.scheduler; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.UnknownHostException; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import org.apache.log4j.Logger; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import edu.berkeley.sparrow.daemon.util.Logging; import edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest; import edu.berkeley.sparrow.thrift.THostPort; import edu.berkeley.sparrow.thrift.TSchedulingRequest; import edu.berkeley.sparrow.thrift.TTaskLaunchSpec; import edu.berkeley.sparrow.thrift.TTaskSpec; import edu.berkeley.sparrow.thrift.TUserGroupInfo; /** * The constrained task placer may be used to place jobs with tasks that are some combination of * constrained and unconstrained, or jobs that just have constrained tasks. */ public class ConstrainedTaskPlacer implements TaskPlacer { private static final Logger LOG = Logger.getLogger(ConstrainedTaskPlacer.class); /** Constrained tasks that have been launched. */ private Set launchedConstrainedTasks; /** * For each node monitor, the constrained tasks that can be launched there. Unconstrained * tasks will never appear in this mapping. Constrained tasks for which * reservations were made on the backend are placed at the beginning of the list; any other * constrained tasks that can run on the backend are placed at the end of the list. */ private Map> unlaunchedConstrainedTasks; /** * For each node monitor where reservations were enqueued, the number of reservations that were * enqueued there. */ private Map outstandingReservations; /** Whether the remaining reservations have been cancelled. */ boolean cancelled; /** Number of tasks that still need to be placed. */ private int numRemainingTasks; private double probeRatio; /** Id of the request associated with this task placer. */ String requestId; /** * Tasks that are unconstrained, so can be placed on any node monitor, that have not yet been * launched. */ List unlaunchedUnconstrainedTasks; ConstrainedTaskPlacer(String requestId, double probeRatio){ this.requestId = requestId; this.probeRatio = probeRatio; launchedConstrainedTasks = new HashSet(); unlaunchedConstrainedTasks = new HashMap>(); unlaunchedUnconstrainedTasks = Lists.newArrayList(); outstandingReservations = new HashMap(); } @Override public Map getEnqueueTaskReservationsRequests( TSchedulingRequest schedulingRequest, String requestId, Collection nodes, THostPort schedulerAddress) { LOG.debug(Logging.functionCall(schedulingRequest, requestId, nodes, schedulerAddress)); numRemainingTasks = schedulingRequest.getTasksSize(); // Tracks number of tasks to be enqueued at each node monitor. HashMap requests = Maps.newHashMap(); // Create a mapping of node monitor hostnames to socket addresses, to use to map node // preferences to the node monitor InetSocketAddresss. // TODO: Perform this in the scheduler, and reuse the mapping across multiple // ConstrainedTaskPlacers? HashMap addrToSocket = Maps.newHashMap(); for (InetSocketAddress node : nodes) { if (addrToSocket.containsKey(node.getAddress())) { // TODO: Should we support this case? Seems like it's only useful for testing. LOG.warn("Two node monitors at " + node.getAddress() + "; only one will be used for " + "scheduling."); } addrToSocket.put(node.getAddress(), node); } /* Shuffle tasks, to ensure that we don't use the same set of machines each time a job is * submitted. */ List taskList = Lists.newArrayList(schedulingRequest.getTasks()); Collections.shuffle(taskList); List unconstrainedTasks = Lists.newArrayList(); for (TTaskSpec task : taskList) { if (task.preference == null || task.preference.nodes == null || task.preference.nodes.size() == 0) { unconstrainedTasks.add(task); continue; } List preferredNodes = taskPreferencesToSocketList(task, addrToSocket); TTaskLaunchSpec taskLaunchSpec = new TTaskLaunchSpec(task.getTaskId(), task.bufferForMessage()); int numEnqueuedNodes = 0; for (InetSocketAddress addr : preferredNodes) { THostPort hostPort = new THostPort(addr.getAddress().getHostAddress(), addr.getPort()); if (!unlaunchedConstrainedTasks.containsKey(hostPort)) { unlaunchedConstrainedTasks.put( hostPort, new LinkedList()); } if (numEnqueuedNodes < probeRatio) { // TODO: Try to select nodes that haven't already been used by another task. if (!requests.containsKey(addr)) { TEnqueueTaskReservationsRequest request = new TEnqueueTaskReservationsRequest( schedulingRequest.getApp(), schedulingRequest.getUser(), requestId, schedulerAddress, 1); requests.put(addr, request); } else { // IsSetNumTasks should already be true, because it was set when the request was // created. requests.get(addr).numTasks += 1; } unlaunchedConstrainedTasks.get(hostPort).add(0, taskLaunchSpec); numEnqueuedNodes += 1; } else { // As an optimization, add the task at the end of the list of tasks on the node monitor, // so that if all the tasks responsible for probing the node monitor have been launched // when the node monitor is ready to launch a task, and this task hasn't been launched // yet, this task can use the node monitor. This means that there may be more entries in // nodeMonitorsToTasks than in nodeMonitorTaskCount for some addresses. unlaunchedConstrainedTasks.get(hostPort).add(taskLaunchSpec); } } if (numEnqueuedNodes < probeRatio) { // This case can occur when the probeRatio is greater than the size of preferred nodes. LOG.info("For request " + requestId + ",task " + task.taskId + ", only created enqueueTaskRequests on " + numEnqueuedNodes + " node monitors, which is fewer than specified by the " + "probe ratio (" + probeRatio + ")"); } } LOG.debug("Request " + requestId + ": created enqueue task reservation requests at " + requests.keySet().size() + " node monitors for constrained tasks. " + unconstrainedTasks.size() + " unconstrained tasks"); if (unconstrainedTasks.size() > 0) { addRequestsForUnconstrainedTasks( unconstrainedTasks, requestId, schedulingRequest.getApp(), schedulingRequest.getUser(), schedulerAddress, nodes, requests); } populateOutstandingReservations(requests); return requests; } private void populateOutstandingReservations( Map requests) { for (Entry entry: requests.entrySet()) { THostPort hostPort = new THostPort( entry.getKey().getAddress().getHostAddress(), entry.getKey().getPort()); outstandingReservations.put(hostPort, entry.getValue().numTasks); } } /** * Adds enqueue task reservation requests for {@link unconstrainedTasks} to {@link requests}. * {@link nodeMonitors} specifies the running node monitors that enqueue task reservations may * be placed on. */ private void addRequestsForUnconstrainedTasks( List unconstrainedTasks, String requestId, String appId, TUserGroupInfo user, THostPort schedulerAddress, Collection nodeMonitors, HashMap requests) { /* Identify the node monitors that aren't already being used for the constrained tasks, and * place all of reservations on those nodes (to try to spread the reservations evenly * throughout the cluster). */ List unusedNodeMonitors = Lists.newArrayList(); for (InetSocketAddress nodeMonitor : nodeMonitors) { if (!requests.containsKey(nodeMonitor)) { unusedNodeMonitors.add(nodeMonitor); } } Collections.shuffle(unusedNodeMonitors); LOG.info("Request " + requestId + ": " + unusedNodeMonitors.size() + " node monitors that were unused by constrained tasks so may be used for " + "unconstrained tasks."); int reservationsToLaunch = (int) Math.ceil(probeRatio * unconstrainedTasks.size()); int reservationsCreated = 0; for (InetSocketAddress nodeMonitor : unusedNodeMonitors) { if (requests.containsKey(nodeMonitor)) { LOG.error("Adding enqueueTaskReservations requests for unused node monitors, so they " + "should not already have any enqueueTaskReservation requests."); } TEnqueueTaskReservationsRequest request = new TEnqueueTaskReservationsRequest( appId, user, requestId, schedulerAddress, 1); requests.put(nodeMonitor, request); reservationsCreated++; if (reservationsCreated >= reservationsToLaunch) { break; } } if (reservationsCreated < reservationsToLaunch) { LOG.error("Trying to launch more reservations than there are nodes; this use case is not " + "currently supported"); } for (TTaskSpec task : unconstrainedTasks) { TTaskLaunchSpec taskLaunchSpec = new TTaskLaunchSpec( task.getTaskId(), task.bufferForMessage()); unlaunchedUnconstrainedTasks.add(taskLaunchSpec); } } /** * Converts the preferences for the task (which contain host names) to a list of socket * addresses. We return the preferences as socket addresses because the addresses are used to * open a client for the node monitor (so need to be InetSocketAddreses). */ private List taskPreferencesToSocketList( TTaskSpec task, HashMap addrToSocket) { // Preferred nodes for this task. List preferredNodes = Lists.newLinkedList(); // Convert the preferences (which contain host names) to a list of socket addresses. Collections.shuffle(task.preference.nodes); for (String node : task.preference.nodes) { try { InetAddress addr = InetAddress.getByName(node); if (addrToSocket.containsKey(addr)) { preferredNodes.add(addrToSocket.get(addr)); } else { LOG.warn("Placement constraint for unknown node " + node); LOG.warn("Node address: " + addr); String knownAddrs = ""; for (InetAddress knownAddress: addrToSocket.keySet()) { knownAddrs += " " + knownAddress.getHostAddress(); } LOG.warn("Know about: " + knownAddrs); } } catch (UnknownHostException e) { LOG.warn("Got placement constraint for unresolvable node " + node); } } return preferredNodes; } @Override public List assignTask(THostPort nodeMonitorAddress) { assert outstandingReservations.containsKey(nodeMonitorAddress); Integer numOutstandingReservations = outstandingReservations.get(nodeMonitorAddress); if (numOutstandingReservations == 1) { outstandingReservations.remove(nodeMonitorAddress); } else { outstandingReservations.put(nodeMonitorAddress, numOutstandingReservations - 1); } TTaskLaunchSpec taskSpec = getConstrainedTask(nodeMonitorAddress); if (taskSpec != null) { this.launchedConstrainedTasks.add(taskSpec); LOG.debug("Request " + requestId + ", node monitor " + nodeMonitorAddress.toString() + ": Assigning task."); --numRemainingTasks; assert numRemainingTasks >= 0; return Lists.newArrayList(taskSpec); } else { List taskSpecs = getUnconstrainedTask(nodeMonitorAddress); numRemainingTasks -= taskSpecs.size(); assert numRemainingTasks >= 0; return taskSpecs; } } /** * Returns an unlaunched task that is constrained to run on the given node. * * Returns null if no such task exists. */ private TTaskLaunchSpec getConstrainedTask(THostPort nodeMonitorAddress) { List taskSpecs = unlaunchedConstrainedTasks.get(nodeMonitorAddress); if (taskSpecs == null) { StringBuilder nodeMonitors = new StringBuilder(); for (THostPort nodeMonitor: unlaunchedConstrainedTasks.keySet()) { if (nodeMonitors.length() > 0) { nodeMonitors.append(","); } nodeMonitors.append(nodeMonitor.toString()); } LOG.debug("Request " + requestId + ", node monitor " + nodeMonitorAddress.toString() + ": Node monitor not in the set of node monitors where constrained tasks were " + "enqueued: " + nodeMonitors.toString() + "; attempting to launch an unconstrained task)."); return null; } while (!taskSpecs.isEmpty()) { TTaskLaunchSpec currentSpec = taskSpecs.remove(0); if (!this.launchedConstrainedTasks.contains(currentSpec)) { return currentSpec; } } LOG.debug("Request " + requestId + ", node monitor " + nodeMonitorAddress.toString() + ": Not assigning a constrained task (no remaining unlaunched tasks that prefer " + "this node)."); return null; } private List getUnconstrainedTask(THostPort nodeMonitorAddress) { if (this.unlaunchedUnconstrainedTasks.size() == 0) { LOG.debug("Request " + requestId + ", node monitor " + nodeMonitorAddress.toString() + ": Not assigning a task (no remaining unconstrained unlaunched tasks)"); return Lists.newArrayList(); } TTaskLaunchSpec spec = unlaunchedUnconstrainedTasks.get(0); unlaunchedUnconstrainedTasks.remove(0); LOG.debug("Request " + requestId + ", node monitor " + nodeMonitorAddress.toString() + ": Assigning task " + spec.getTaskId()); return Lists.newArrayList(spec); } @Override public boolean allTasksPlaced() { return numRemainingTasks == 0; } @Override public Set getOutstandingNodeMonitorsForCancellation() { if (!cancelled) { cancelled = true; return outstandingReservations.keySet(); } return new HashSet(); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/scheduler/Scheduler.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.scheduler; import java.io.IOException; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicInteger; import org.apache.commons.configuration.Configuration; import org.apache.log4j.Logger; import org.apache.thrift.TException; import org.apache.thrift.async.AsyncMethodCallback; import com.google.common.base.Optional; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import edu.berkeley.sparrow.daemon.SparrowConf; import edu.berkeley.sparrow.daemon.util.Logging; import edu.berkeley.sparrow.daemon.util.Network; import edu.berkeley.sparrow.daemon.util.Serialization; import edu.berkeley.sparrow.daemon.util.ThriftClientPool; import edu.berkeley.sparrow.thrift.FrontendService; import edu.berkeley.sparrow.thrift.FrontendService.AsyncClient.frontendMessage_call; import edu.berkeley.sparrow.thrift.InternalService; import edu.berkeley.sparrow.thrift.InternalService.AsyncClient; import edu.berkeley.sparrow.thrift.InternalService.AsyncClient.enqueueTaskReservations_call; import edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest; import edu.berkeley.sparrow.thrift.TFullTaskId; import edu.berkeley.sparrow.thrift.THostPort; import edu.berkeley.sparrow.thrift.TPlacementPreference; import edu.berkeley.sparrow.thrift.TSchedulingRequest; import edu.berkeley.sparrow.thrift.TTaskLaunchSpec; import edu.berkeley.sparrow.thrift.TTaskSpec; /** * This class implements the Sparrow scheduler functionality. */ public class Scheduler { private final static Logger LOG = Logger.getLogger(Scheduler.class); private final static Logger AUDIT_LOG = Logging.getAuditLogger(Scheduler.class); /** Used to uniquely identify requests arriving at this scheduler. */ private AtomicInteger counter = new AtomicInteger(0); /** How many times the special case has been triggered. */ private AtomicInteger specialCaseCounter = new AtomicInteger(0); private THostPort address; /** Socket addresses for each frontend. */ HashMap frontendSockets = new HashMap(); /** * Service that handles cancelling outstanding reservations for jobs that have already been * scheduled. Only instantiated if {@code SparrowConf.CANCELLATION} is set to true. */ private CancellationService cancellationService; private boolean useCancellation; /** Thrift client pool for communicating with node monitors */ ThriftClientPool nodeMonitorClientPool = new ThriftClientPool( new ThriftClientPool.InternalServiceMakerFactory()); /** Thrift client pool for communicating with front ends. */ private ThriftClientPool frontendClientPool = new ThriftClientPool( new ThriftClientPool.FrontendServiceMakerFactory()); /** Information about cluster workload due to other schedulers. */ private SchedulerState state; /** Probe ratios to use if the probe ratio is not explicitly set in the request. */ private double defaultProbeRatioUnconstrained; private double defaultProbeRatioConstrained; /** * For each request, the task placer that should be used to place the request's tasks. Indexed * by the request ID. */ private ConcurrentMap requestTaskPlacers; /** * When a job includes SPREAD_EVENLY in the description and has this number of tasks, * Sparrow spreads the tasks evenly over machines to evenly cache data. We need this (in * addition to the SPREAD_EVENLY descriptor) because only the reduce phase -- not the map * phase -- should be spread. */ private int spreadEvenlyTaskSetSize; private Configuration conf; public void initialize(Configuration conf, InetSocketAddress socket) throws IOException { address = Network.socketAddressToThrift(socket); String mode = conf.getString(SparrowConf.DEPLYOMENT_MODE, "unspecified"); this.conf = conf; if (mode.equals("standalone")) { state = new StandaloneSchedulerState(); } else if (mode.equals("configbased")) { state = new ConfigSchedulerState(); } else { throw new RuntimeException("Unsupported deployment mode: " + mode); } state.initialize(conf); defaultProbeRatioUnconstrained = conf.getDouble(SparrowConf.SAMPLE_RATIO, SparrowConf.DEFAULT_SAMPLE_RATIO); defaultProbeRatioConstrained = conf.getDouble(SparrowConf.SAMPLE_RATIO_CONSTRAINED, SparrowConf.DEFAULT_SAMPLE_RATIO_CONSTRAINED); requestTaskPlacers = Maps.newConcurrentMap(); useCancellation = conf.getBoolean(SparrowConf.CANCELLATION, SparrowConf.DEFAULT_CANCELLATION); if (useCancellation) { LOG.debug("Initializing cancellation service"); cancellationService = new CancellationService(nodeMonitorClientPool); new Thread(cancellationService).start(); } else { LOG.debug("Not using cancellation"); } spreadEvenlyTaskSetSize = conf.getInt(SparrowConf.SPREAD_EVENLY_TASK_SET_SIZE, SparrowConf.DEFAULT_SPREAD_EVENLY_TASK_SET_SIZE); } public boolean registerFrontend(String appId, String addr) { LOG.debug(Logging.functionCall(appId, addr)); Optional socketAddress = Serialization.strToSocket(addr); if (!socketAddress.isPresent()) { LOG.error("Bad address from frontend: " + addr); return false; } frontendSockets.put(appId, socketAddress.get()); return state.watchApplication(appId); } /** * Callback for enqueueTaskReservations() that returns the client to the client pool. */ private class EnqueueTaskReservationsCallback implements AsyncMethodCallback { String requestId; InetSocketAddress nodeMonitorAddress; long startTimeMillis; public EnqueueTaskReservationsCallback(String requestId, InetSocketAddress nodeMonitorAddress) { this.requestId = requestId; this.nodeMonitorAddress = nodeMonitorAddress; this.startTimeMillis = System.currentTimeMillis(); } public void onComplete(enqueueTaskReservations_call response) { AUDIT_LOG.debug(Logging.auditEventString( "scheduler_complete_enqueue_task", requestId, nodeMonitorAddress.getAddress().getHostAddress())); long totalTime = System.currentTimeMillis() - startTimeMillis; LOG.debug("Enqueue Task RPC to " + nodeMonitorAddress.getAddress().getHostAddress() + " for request " + requestId + " completed in " + totalTime + "ms"); try { nodeMonitorClientPool.returnClient(nodeMonitorAddress, (AsyncClient) response.getClient()); } catch (Exception e) { LOG.error("Error returning client to node monitor client pool: " + e); } return; } public void onError(Exception exception) { // Do not return error client to pool LOG.error("Error executing enqueueTaskReservation RPC:" + exception); } } /** Adds constraints such that tasks in the job will be spread evenly across the cluster. * * We expect three of these special jobs to be submitted; 3 sequential calls to this * method will result in spreading the tasks for the 3 jobs across the cluster such that no * more than 1 task is assigned to each machine. */ private TSchedulingRequest addConstraintsToSpreadTasks(TSchedulingRequest req) throws TException { LOG.info("Handling spread tasks request: " + req); int specialCaseIndex = specialCaseCounter.incrementAndGet(); if (specialCaseIndex < 1 || specialCaseIndex > 3) { LOG.error("Invalid special case index: " + specialCaseIndex); } // No tasks have preferences and we have the magic number of tasks TSchedulingRequest newReq = new TSchedulingRequest(); newReq.user = req.user; newReq.app = req.app; newReq.probeRatio = req.probeRatio; List allBackends = Lists.newArrayList(); List backends = Lists.newArrayList(); // We assume the below always returns the same order (invalid assumption?) for (InetSocketAddress backend : state.getBackends(req.app)) { allBackends.add(backend); } // Each time this is called, we restrict to 1/3 of the nodes in the cluster for (int i = 0; i < allBackends.size(); i++) { if (i % 3 == specialCaseIndex - 1) { backends.add(allBackends.get(i)); } } Collections.shuffle(backends); if (!(allBackends.size() >= (req.getTasks().size() * 3))) { LOG.error("Special case expects at least three times as many machines as tasks."); return null; } LOG.info(backends); for (int i = 0; i < req.getTasksSize(); i++) { TTaskSpec task = req.getTasks().get(i); TTaskSpec newTask = new TTaskSpec(); newTask.message = task.message; newTask.taskId = task.taskId; newTask.preference = new TPlacementPreference(); newTask.preference.addToNodes(backends.get(i).getHostName()); newReq.addToTasks(newTask); } LOG.info("New request: " + newReq); return newReq; } /** Checks whether we should add constraints to this job to evenly spread tasks over machines. * * This is a hack used to force Spark to cache data in 3 locations: we run 3 select * queries * on the same table and spread the tasks for those queries evenly across the cluster such that * the input data for the query is triple replicated and spread evenly across the cluster. * * We signal that Sparrow should use this hack by adding SPREAD_TASKS to the job's description. */ private boolean isSpreadTasksJob(TSchedulingRequest request) { if ((request.getDescription() != null) && (request.getDescription().indexOf("SPREAD_EVENLY") != -1)) { // Need to check to see if there are 3 constraints; if so, it's the map phase of the // first job that reads the data from HDFS, so we shouldn't override the constraints. for (TTaskSpec t: request.getTasks()) { if (t.getPreference() != null && (t.getPreference().getNodes() != null) && (t.getPreference().getNodes().size() == 3)) { LOG.debug("Not special case: one of request's tasks had 3 preferences"); return false; } } if (request.getTasks().size() != spreadEvenlyTaskSetSize) { LOG.debug("Not special case: job had " + request.getTasks().size() + " tasks rather than the expected " + spreadEvenlyTaskSetSize); return false; } if (specialCaseCounter.get() >= 3) { LOG.error("Not using special case because special case code has already been " + " called 3 more more times!"); return false; } LOG.debug("Spreading tasks for job with " + request.getTasks().size() + " tasks"); return true; } LOG.debug("Not special case: description did not contain SPREAD_EVENLY"); return false; } public void submitJob(TSchedulingRequest request) throws TException { // Short-circuit case that is used for liveness checking if (request.tasks.size() == 0) { return; } if (isSpreadTasksJob(request)) { handleJobSubmission(addConstraintsToSpreadTasks(request)); } else { handleJobSubmission(request); } } public void handleJobSubmission(TSchedulingRequest request) throws TException { LOG.debug(Logging.functionCall(request)); long start = System.currentTimeMillis(); String requestId = getRequestId(); String user = ""; if (request.getUser() != null && request.getUser().getUser() != null) { user = request.getUser().getUser(); } String description = ""; if (request.getDescription() != null) { description = request.getDescription(); } String app = request.getApp(); List tasks = request.getTasks(); Set backends = state.getBackends(app); LOG.debug("NumBackends: " + backends.size()); boolean constrained = false; for (TTaskSpec task : tasks) { constrained = constrained || ( task.preference != null && task.preference.nodes != null && !task.preference.nodes.isEmpty()); } // Logging the address here is somewhat redundant, since all of the // messages in this particular log file come from the same address. // However, it simplifies the process of aggregating the logs, and will // also be useful when we support multiple daemons running on a single // machine. AUDIT_LOG.info(Logging.auditEventString("arrived", requestId, request.getTasks().size(), address.getHost(), address.getPort(), user, description, constrained)); TaskPlacer taskPlacer; if (constrained) { if (request.isSetProbeRatio()) { taskPlacer = new ConstrainedTaskPlacer(requestId, request.getProbeRatio()); } else { taskPlacer = new ConstrainedTaskPlacer(requestId, defaultProbeRatioConstrained); } } else { if (request.isSetProbeRatio()) { taskPlacer = new UnconstrainedTaskPlacer(requestId, request.getProbeRatio()); } else { taskPlacer = new UnconstrainedTaskPlacer(requestId, defaultProbeRatioUnconstrained); } } requestTaskPlacers.put(requestId, taskPlacer); Map enqueueTaskReservationsRequests; enqueueTaskReservationsRequests = taskPlacer.getEnqueueTaskReservationsRequests( request, requestId, backends, address); // Request to enqueue a task at each of the selected nodes. for (Entry entry : enqueueTaskReservationsRequests.entrySet()) { try { InternalService.AsyncClient client = nodeMonitorClientPool.borrowClient(entry.getKey()); LOG.debug("Launching enqueueTask for request " + requestId + "on node: " + entry.getKey()); AUDIT_LOG.debug(Logging.auditEventString( "scheduler_launch_enqueue_task", entry.getValue().requestId, entry.getKey().getAddress().getHostAddress())); client.enqueueTaskReservations( entry.getValue(), new EnqueueTaskReservationsCallback(requestId, entry.getKey())); } catch (Exception e) { LOG.error("Error enqueuing task on node " + entry.getKey().toString() + ":" + e); } } long end = System.currentTimeMillis(); LOG.debug("All tasks enqueued for request " + requestId + "; returning. Total time: " + (end - start) + " milliseconds"); } public List getTask( String requestId, THostPort nodeMonitorAddress) { /* TODO: Consider making this synchronized to avoid the need for synchronization in * the task placers (although then we'd lose the ability to parallelize over task placers). */ LOG.debug(Logging.functionCall(requestId, nodeMonitorAddress)); TaskPlacer taskPlacer = requestTaskPlacers.get(requestId); if (taskPlacer == null) { LOG.debug("Received getTask() request for request " + requestId + ", which had no more " + "unplaced tasks"); return Lists.newArrayList(); } synchronized(taskPlacer) { List taskLaunchSpecs = taskPlacer.assignTask(nodeMonitorAddress); if (taskLaunchSpecs == null || taskLaunchSpecs.size() > 1) { LOG.error("Received invalid task placement for request " + requestId + ": " + taskLaunchSpecs.toString()); return Lists.newArrayList(); } else if (taskLaunchSpecs.size() == 1) { AUDIT_LOG.info(Logging.auditEventString("scheduler_assigned_task", requestId, taskLaunchSpecs.get(0).taskId, nodeMonitorAddress.getHost())); } else { AUDIT_LOG.info(Logging.auditEventString("scheduler_get_task_no_task", requestId, nodeMonitorAddress.getHost())); } if (taskPlacer.allTasksPlaced()) { LOG.debug("All tasks placed for request " + requestId); requestTaskPlacers.remove(requestId); if (useCancellation) { Set outstandingNodeMonitors = taskPlacer.getOutstandingNodeMonitorsForCancellation(); for (THostPort nodeMonitorToCancel : outstandingNodeMonitors) { cancellationService.addCancellation(requestId, nodeMonitorToCancel); } } } return taskLaunchSpecs; } } /** * Returns an ID that identifies a request uniquely (across all Sparrow schedulers). * * This should only be called once for each request (it will return a different * identifier if called a second time). * * TODO: Include the port number, so this works when there are multiple schedulers * running on a single machine. */ private String getRequestId() { /* The request id is a string that includes the IP address of this scheduler followed * by the counter. We use a counter rather than a hash of the request because there * may be multiple requests to run an identical job. */ return String.format("%s_%d", Network.getIPAddress(conf), counter.getAndIncrement()); } private class sendFrontendMessageCallback implements AsyncMethodCallback { private InetSocketAddress frontendSocket; private FrontendService.AsyncClient client; public sendFrontendMessageCallback(InetSocketAddress socket, FrontendService.AsyncClient client) { frontendSocket = socket; this.client = client; } public void onComplete(frontendMessage_call response) { try { frontendClientPool.returnClient(frontendSocket, client); } catch (Exception e) { LOG.error(e); } } public void onError(Exception exception) { // Do not return error client to pool LOG.error("Error sending frontend message callback: " + exception); } } public void sendFrontendMessage(String app, TFullTaskId taskId, int status, ByteBuffer message) { LOG.debug(Logging.functionCall(app, taskId, message)); InetSocketAddress frontend = frontendSockets.get(app); if (frontend == null) { LOG.error("Requested message sent to unregistered app: " + app); } try { FrontendService.AsyncClient client = frontendClientPool.borrowClient(frontend); client.frontendMessage(taskId, status, message, new sendFrontendMessageCallback(frontend, client)); } catch (IOException e) { LOG.error("Error launching message on frontend: " + app, e); } catch (TException e) { LOG.error("Error launching message on frontend: " + app, e); } catch (Exception e) { LOG.error("Error launching message on frontend: " + app, e); } } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/scheduler/SchedulerState.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.scheduler; import java.io.IOException; import java.net.InetSocketAddress; import java.util.Set; import org.apache.commons.configuration.Configuration; /** * State storage for the Sparrow {@link Scheduler}. This is stored in its * own class since state storage may involve communicating to external services * such as ZooKeeper. */ public interface SchedulerState { /** * Initialize state storage. This should open connections to any external * services if required. * @throws IOException */ public void initialize(Configuration conf) throws IOException; /** * Signal that state storage will be queried for information about * {@code appId} in the future. */ public boolean watchApplication(String appId); /** * Get the backends available for a particular application. Each backend includes a * resource vector giving current available resources. TODO: this might be changed * to include more detailed information per-node. */ public Set getBackends(String appId); } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/scheduler/SchedulerThrift.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.scheduler; import java.io.IOException; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.util.List; import org.apache.commons.configuration.Configuration; import org.apache.thrift.TException; import edu.berkeley.sparrow.daemon.SparrowConf; import edu.berkeley.sparrow.daemon.util.Network; import edu.berkeley.sparrow.daemon.util.TServers; import edu.berkeley.sparrow.thrift.SchedulerService; import edu.berkeley.sparrow.thrift.GetTaskService; import edu.berkeley.sparrow.thrift.TFullTaskId; import edu.berkeley.sparrow.thrift.THostPort; import edu.berkeley.sparrow.thrift.TSchedulingRequest; import edu.berkeley.sparrow.thrift.TTaskLaunchSpec; /** * This class extends the thrift sparrow scheduler interface. It wraps the * {@link Scheduler} class and delegates most calls to that class. */ public class SchedulerThrift implements SchedulerService.Iface, GetTaskService.Iface { // Defaults if not specified by configuration public final static int DEFAULT_SCHEDULER_THRIFT_PORT = 20503; private final static int DEFAULT_SCHEDULER_THRIFT_THREADS = 8; public final static int DEFAULT_GET_TASK_PORT = 20507; private Scheduler scheduler = new Scheduler(); /** * Initialize this thrift service. * * This spawns a multi-threaded thrift server and listens for Sparrow * scheduler requests. */ public void initialize(Configuration conf) throws IOException { SchedulerService.Processor processor = new SchedulerService.Processor(this); int port = conf.getInt(SparrowConf.SCHEDULER_THRIFT_PORT, DEFAULT_SCHEDULER_THRIFT_PORT); int threads = conf.getInt(SparrowConf.SCHEDULER_THRIFT_THREADS, DEFAULT_SCHEDULER_THRIFT_THREADS); String hostname = Network.getHostName(conf); InetSocketAddress addr = new InetSocketAddress(hostname, port); scheduler.initialize(conf, addr); TServers.launchThreadedThriftServer(port, threads, processor); int getTaskPort = conf.getInt(SparrowConf.GET_TASK_PORT, DEFAULT_GET_TASK_PORT); GetTaskService.Processor getTaskprocessor = new GetTaskService.Processor(this); TServers.launchSingleThreadThriftServer(getTaskPort, getTaskprocessor); } @Override public boolean registerFrontend(String app, String socketAddress) { return scheduler.registerFrontend(app, socketAddress); } @Override public void submitJob(TSchedulingRequest req) throws TException { scheduler.submitJob(req); } @Override public void sendFrontendMessage(String app, TFullTaskId taskId, int status, ByteBuffer message) throws TException { scheduler.sendFrontendMessage(app, taskId, status, message); } @Override public List getTask(String requestId, THostPort nodeMonitorAddress) throws TException { return scheduler.getTask(requestId, nodeMonitorAddress); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/scheduler/StandaloneSchedulerState.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.scheduler; import java.net.InetSocketAddress; import java.util.Set; import org.apache.commons.configuration.Configuration; import edu.berkeley.sparrow.daemon.StandaloneStateStore; /** * Implementation of state storage for use in a standalone deployment of * Sparrow. */ public class StandaloneSchedulerState implements SchedulerState { private StandaloneStateStore state = StandaloneStateStore.getInstance(); @Override public void initialize(Configuration conf) { } @Override public boolean watchApplication(String appId) { return true; } @Override public Set getBackends(String appId) { return state.getBackends(appId); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/scheduler/TaskPlacer.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.scheduler; import java.net.InetSocketAddress; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Set; import edu.berkeley.sparrow.daemon.SparrowConf; import edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest; import edu.berkeley.sparrow.thrift.THostPort; import edu.berkeley.sparrow.thrift.TSchedulingRequest; import edu.berkeley.sparrow.thrift.TTaskLaunchSpec; /*** * A TaskPlacer is responsible for assigning the tasks in a job to backends. Assigning tasks to * backends occurs in two phases: * (1) Task reservations are enqueued on backends. Typically more task reservations are enqueued * than there are tasks that need to run (the ratio of task reservations to tasks is set * using {@link SparrowConf.SAMPLE_RATIO} and {@link SparrowConf.SAMPLE_RATIO_CONSTRAINED}). * (2) When backends are ready to run a task, they reply to the scheduler with a GetTask() * RPC. The scheduler passes this call on to the task placer; if there are tasks remaining * that can be run on that machine, the TaskPlacer responds with a specification for the * task. * A TaskPlacer is responsible for determining where to enqueue task reservations, and how to * assign tasks to backends once a backend signals that it's ready to execute a task. TaskPlacers * are created per-job and persist state across these two phases. * * TaskPlacers are not thread safe; access to a particular TaskPlacer should be serialized. */ public interface TaskPlacer { /** * Returns a mapping of node monitor socket addresses to {@link TEnqueueTaskReservationRequest}s * that should be send to those node monitors. The caller is responsible for ensuring that * {@link schedulingRequest} is properly filled out. */ public Map getEnqueueTaskReservationsRequests( TSchedulingRequest schedulingRequest, String requestId, Collection nodes, THostPort schedulerAddress); /** * Returns a List of {@link TTaskLaunchSpec}s describing tasks that should be launched from the * give node monitor. Always returns either 0 or 1 tasks. */ public List assignTask(THostPort nodeMonitorAddress); /** Returns true if all of the job's tasks have been placed. */ public boolean allTasksPlaced(); /** Returns the node monitors with outstanding reservations for this request. * * After this method is called once, the TaskPlacer assumes all those node monitors were sent * cancellation messages, so it will not return any node monitors in the future. */ public Set getOutstandingNodeMonitorsForCancellation(); } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/scheduler/UnconstrainedTaskPlacer.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.scheduler; import java.net.InetSocketAddress; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.log4j.Logger; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import edu.berkeley.sparrow.daemon.util.Logging; import edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest; import edu.berkeley.sparrow.thrift.THostPort; import edu.berkeley.sparrow.thrift.TSchedulingRequest; import edu.berkeley.sparrow.thrift.TTaskLaunchSpec; import edu.berkeley.sparrow.thrift.TTaskSpec; /** * A task placer for jobs whose tasks have no placement constraints. */ public class UnconstrainedTaskPlacer implements TaskPlacer { private static final Logger LOG = Logger.getLogger(UnconstrainedTaskPlacer.class); /** Specifications for tasks that have not yet been launched. */ List unlaunchedTasks; /** * For each node monitor where reservations were enqueued, the number of reservations that were * enqueued there. */ private Map outstandingReservations; /** Whether the remaining reservations have been cancelled. */ boolean cancelled; /** * Id of the request associated with this task placer. */ String requestId; private double probeRatio; UnconstrainedTaskPlacer(String requestId, double probeRatio) { this.requestId = requestId; this.probeRatio = probeRatio; unlaunchedTasks = new LinkedList(); outstandingReservations = new HashMap(); cancelled = false; } @Override public Map getEnqueueTaskReservationsRequests( TSchedulingRequest schedulingRequest, String requestId, Collection nodes, THostPort schedulerAddress) { LOG.debug(Logging.functionCall(schedulingRequest, requestId, nodes, schedulerAddress)); int numTasks = schedulingRequest.getTasks().size(); int reservationsToLaunch = (int) Math.ceil(probeRatio * numTasks); LOG.debug("Request " + requestId + ": Creating " + reservationsToLaunch + " task reservations for " + numTasks + " tasks"); // Get a random subset of nodes by shuffling list. List nodeList = Lists.newArrayList(nodes); Collections.shuffle(nodeList); if (reservationsToLaunch < nodeList.size()) nodeList = nodeList.subList(0, reservationsToLaunch); for (TTaskSpec task : schedulingRequest.getTasks()) { TTaskLaunchSpec taskLaunchSpec = new TTaskLaunchSpec(task.getTaskId(), task.bufferForMessage()); unlaunchedTasks.add(taskLaunchSpec); } HashMap requests = Maps.newHashMap(); int numReservationsPerNode = 1; if (nodeList.size() < reservationsToLaunch) { numReservationsPerNode = reservationsToLaunch / nodeList.size(); } StringBuilder debugString = new StringBuilder(); for (int i = 0; i < nodeList.size(); i++) { int numReservations = numReservationsPerNode; if (reservationsToLaunch % nodeList.size() > i) ++numReservations; InetSocketAddress node = nodeList.get(i); debugString.append(node.getAddress().getHostAddress() + ":" + node.getPort()); debugString.append(";"); // TODO: this needs to be a count! outstandingReservations.put( new THostPort(node.getAddress().getHostAddress(), node.getPort()), numReservations); TEnqueueTaskReservationsRequest request = new TEnqueueTaskReservationsRequest( schedulingRequest.getApp(), schedulingRequest.getUser(), requestId, schedulerAddress, numReservations); requests.put(node, request); } LOG.debug("Request " + requestId + ": Launching enqueueReservation on " + nodeList.size() + " node monitors: " + debugString.toString()); return requests; } @Override public List assignTask(THostPort nodeMonitorAddress) { Integer numOutstandingReservations = outstandingReservations.get(nodeMonitorAddress); if (numOutstandingReservations == null) { LOG.error("Node monitor " + nodeMonitorAddress + " not in list of outstanding reservations"); return Lists.newArrayList(); } if (numOutstandingReservations == 1) { outstandingReservations.remove(nodeMonitorAddress); } else { outstandingReservations.put(nodeMonitorAddress, numOutstandingReservations - 1); } if (unlaunchedTasks.isEmpty()) { LOG.debug("Request " + requestId + ", node monitor " + nodeMonitorAddress.toString() + ": Not assigning a task (no remaining unlaunched tasks)."); return Lists.newArrayList(); } else { TTaskLaunchSpec launchSpec = unlaunchedTasks.get(0); unlaunchedTasks.remove(0); LOG.debug("Request " + requestId + ", node monitor " + nodeMonitorAddress.toString() + ": Assigning task"); return Lists.newArrayList(launchSpec); } } @Override public boolean allTasksPlaced() { return unlaunchedTasks.isEmpty(); } @Override public Set getOutstandingNodeMonitorsForCancellation() { if (!cancelled) { cancelled = true; return outstandingReservations.keySet(); } return new HashSet(); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/util/ConfigUtil.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.util; import java.net.InetSocketAddress; import java.util.HashSet; import java.util.Set; import org.apache.commons.configuration.Configuration; import org.apache.log4j.Logger; import com.google.common.base.Optional; import edu.berkeley.sparrow.daemon.SparrowConf; import edu.berkeley.sparrow.thrift.TResourceVector; /** * Utilities to aid the configuration file-based scheduler and node monitor. */ public class ConfigUtil { private final static Logger LOG = Logger.getLogger(ConfigUtil.class); /** * Parses the list of backends from a {@link Configuration}. * * Returns a map of address of backends to a {@link TResourceVector} describing the * total resource capacity for that backend. */ public static Set parseBackends( Configuration conf) { if (!conf.containsKey(SparrowConf.STATIC_NODE_MONITORS)) { throw new RuntimeException("Missing configuration node monitor list"); } Set backends = new HashSet(); for (String node: conf.getStringArray(SparrowConf.STATIC_NODE_MONITORS)) { Optional addr = Serialization.strToSocket(node); if (!addr.isPresent()) { LOG.warn("Bad backend address: " + node); continue; } backends.add(addr.get()); } return backends; } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/util/Logging.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.util; import java.io.IOException; import java.lang.management.GarbageCollectorMXBean; import java.lang.management.ManagementFactory; import java.util.Random; import org.apache.log4j.FileAppender; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import com.google.common.base.Joiner; public class Logging { public final static String AUDIT_LOGGER_NAME = "audit"; public final static String AUDIT_LOG_FILENAME_FORMAT = "sparrow_audit.%d.%d.log"; public final static String AUDIT_LOG_FORMAT = "%c\t%m%n"; private static Joiner paramJoiner = Joiner.on(",").useForNull("null"); private static Joiner auditParamJoiner = Joiner.on("\t"); private static Joiner auditEventParamJoiner = Joiner.on(":"); /** * Sets up audit logging to log to a file named based on the current time (in * ms). * * The logger is configured to effectively ignore the log level. * * @throws IOException * if the audit log file could not be opened for writing. */ public static void configureAuditLogging() throws IOException { PatternLayout layout = new PatternLayout(AUDIT_LOG_FORMAT); // This assumes that no other daemon will be started within 1 millisecond. String filename = String.format(AUDIT_LOG_FILENAME_FORMAT, System.currentTimeMillis(), new Random().nextInt(Integer.MAX_VALUE)); FileAppender fileAppender = new FileAppender(layout, filename); Logger auditLogger = Logger.getLogger(Logging.AUDIT_LOGGER_NAME); auditLogger.addAppender(fileAppender); auditLogger.setLevel(Level.ALL); /* * We don't want audit messages to be appended to the main appender, which * is intended for potentially user-facing messages. */ auditLogger.setAdditivity(false); } /** Returns the total count of garbage collections. */ public static long getGCCount() { long totalGarbageCollections = 0; for (GarbageCollectorMXBean gc : ManagementFactory .getGarbageCollectorMXBeans()) { long count = gc.getCollectionCount(); if (count >= 0) { totalGarbageCollections += count; } } return totalGarbageCollections; } /** Returns the total time that has been spent on garbage collection. */ public static long getGCTime() { long garbageCollectionTime = 0; for (GarbageCollectorMXBean gc : ManagementFactory .getGarbageCollectorMXBeans()) { long time = gc.getCollectionTime(); if (time >= 0) { garbageCollectionTime += time; } } return garbageCollectionTime; } /** * Returns a log string for the given event, starting with the epoch time. */ public static String auditEventString(Object... params) { return auditParamJoiner.join(System.currentTimeMillis(), auditEventParamJoiner.join(params)); } /** * Returns a logger to be used for audit logging messages for the given class. */ @SuppressWarnings("rawtypes") public static Logger getAuditLogger(Class clazz) { return Logger.getLogger(String.format("%s.%s", AUDIT_LOGGER_NAME, clazz.getName())); } /** * Return a function name (determined via reflection) and all its parameters * (passed) in a consistent stringformat. Very helpful in logging function * calls throughout our program. */ public static String functionCall(Object... params) { String name = Thread.currentThread().getStackTrace()[2].getMethodName(); return name + ": [" + paramJoiner.join(params) + "]"; } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/util/Network.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.util; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.UnknownHostException; import org.apache.commons.configuration.Configuration; import edu.berkeley.sparrow.daemon.SparrowConf; import edu.berkeley.sparrow.thrift.THostPort; public class Network { public static THostPort socketAddressToThrift(InetSocketAddress address) { return new THostPort(address.getAddress().getHostAddress(), address.getPort()); } /** Return the hostname of this machine, based on configured value, or system * Interrogation. */ public static String getHostName(Configuration conf) { String defaultHostname = null; try { defaultHostname = InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { defaultHostname = "localhost"; } return conf.getString(SparrowConf.HOSTNAME, defaultHostname); } /** * Return the IP address of this machine, as determined from the hostname * specified in configuration or from querying the machine. */ public static String getIPAddress(Configuration conf) { String hostname = getHostName(conf); try { return InetAddress.getByName(hostname).getHostAddress(); } catch (UnknownHostException e) { return "IP UNKNOWN"; } } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/util/Resolution.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.util; public class Resolution { } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/util/Resources.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.util; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import org.apache.commons.configuration.Configuration; import edu.berkeley.sparrow.daemon.SparrowConf; /** Utilities for interrogating system resources. */ public class Resources { public static int getSystemMemoryMb(Configuration conf) { int systemMemory = -1; try { Process p = Runtime.getRuntime().exec("cat /proc/meminfo"); BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream())); String line = in.readLine(); while (line != null) { if (line.contains("MemTotal")) { String[] parts = line.split("\\s+"); if (parts.length > 1) { int memory = Integer.parseInt(parts[1]) / 1000; systemMemory = memory; } } line = in.readLine(); } } catch (IOException e) {} if (conf.containsKey(SparrowConf.SYSTEM_MEMORY)) { return conf.getInt(SparrowConf.SYSTEM_MEMORY); } else { if (systemMemory != -1) { return systemMemory; } else { return SparrowConf.DEFAULT_SYSTEM_MEMORY; } } } public static int getSystemCPUCount(Configuration conf) { // No system interrogation yet return conf.getInt(SparrowConf.SYSTEM_CPUS, SparrowConf.DEFAULT_SYSTEM_CPUS); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/util/Serialization.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.util; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import com.google.common.base.Optional; /** Utility functions for serializing data types to/from string representation .**/ public class Serialization { public static Optional strToSocket(String in) { String[] parts = in.split(":"); if (parts.length != 2) { return Optional.absent(); } String host = parts[0]; // This deals with the wonky way Java InetAddress toString() represents an address: // "hostname/IP" if (parts[0].contains("/")) { host = parts[0].split("/")[1]; } try { return Optional.of(new InetSocketAddress( host, Integer.parseInt(parts[1]))); } catch (NumberFormatException e) { return Optional.absent(); } } public static byte[] getByteBufferContents(ByteBuffer buffer) { byte[] out = new byte[buffer.limit() - buffer.position()]; buffer.get(out); return out; } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/util/TClients.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.util; import java.io.IOException; import java.net.InetSocketAddress; import org.apache.log4j.Logger; import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.protocol.TProtocol; import org.apache.thrift.transport.TFramedTransport; import org.apache.thrift.transport.TSocket; import org.apache.thrift.transport.TTransport; import org.apache.thrift.transport.TTransportException; import edu.berkeley.sparrow.thrift.BackendService; import edu.berkeley.sparrow.thrift.FrontendService; import edu.berkeley.sparrow.thrift.GetTaskService; import edu.berkeley.sparrow.thrift.NodeMonitorService; import edu.berkeley.sparrow.thrift.SchedulerService; import edu.berkeley.sparrow.thrift.StateStoreService; /** * Helper functions for creating Thrift clients for various Sparrow interfaces. */ public class TClients { private final static Logger LOG = Logger.getLogger(TClients.class); public static NodeMonitorService.Client createBlockingNmClient(String host, int port) throws IOException { return createBlockingNmClient(host, port, 0); } public static NodeMonitorService.Client createBlockingNmClient(String host, int port, int timeout) throws IOException { TTransport tr = new TFramedTransport(new TSocket(host, port, timeout)); try { tr.open(); } catch (TTransportException e) { LOG.warn("Error creating node monitor client to " + host + ":" + port); throw new IOException(e); } TProtocol proto = new TBinaryProtocol(tr); NodeMonitorService.Client client = new NodeMonitorService.Client(proto); return client; } public static SchedulerService.Client createBlockingSchedulerClient( InetSocketAddress socket) throws IOException { return createBlockingSchedulerClient(socket.getAddress().getHostAddress(), socket.getPort()); } public static SchedulerService.Client createBlockingSchedulerClient( String host, int port) throws IOException { return createBlockingSchedulerClient(host, port, 0); } public static SchedulerService.Client createBlockingSchedulerClient( String host, int port, int timeout) throws IOException { TTransport tr = new TFramedTransport(new TSocket(host, port, timeout)); try { tr.open(); } catch (TTransportException e) { LOG.warn("Error creating scheduler client to " + host + ":" + port); throw new IOException(e); } TProtocol proto = new TBinaryProtocol(tr); SchedulerService.Client client = new SchedulerService.Client(proto); return client; } public static GetTaskService.Client createBlockingGetTaskClient( InetSocketAddress socket) throws IOException { return createBlockingGetTaskClient(socket.getAddress().getHostAddress(), socket.getPort()); } public static GetTaskService.Client createBlockingGetTaskClient( String host, int port) throws IOException { return createBlockingGetTaskClient(host, port, 0); } public static GetTaskService.Client createBlockingGetTaskClient( String host, int port, int timeout) throws IOException { TTransport tr = new TFramedTransport(new TSocket(host, port, timeout)); try { tr.open(); } catch (TTransportException e) { LOG.warn("Error creating scheduler client to " + host + ":" + port); throw new IOException(e); } TProtocol proto = new TBinaryProtocol(tr); GetTaskService.Client client = new GetTaskService.Client(proto); return client; } public static BackendService.Client createBlockingBackendClient( InetSocketAddress socket) throws IOException { return createBlockingBackendClient(socket.getAddress().getHostAddress(), socket.getPort()); } public static BackendService.Client createBlockingBackendClient( String host, int port) throws IOException { TTransport tr = new TFramedTransport(new TSocket(host, port)); try { tr.open(); } catch (TTransportException e) { LOG.warn("Error creating backend client to " + host + ":" + port); throw new IOException(e); } TProtocol proto = new TBinaryProtocol(tr); BackendService.Client client = new BackendService.Client(proto); return client; } public static StateStoreService.Client createBlockingStateStoreClient( String host, int port) throws IOException { TTransport tr = new TFramedTransport(new TSocket(host, port)); try { tr.open(); } catch (TTransportException e) { LOG.warn("Error creating state store client to " + host + ":" + port); throw new IOException(e); } TProtocol proto = new TBinaryProtocol(tr); StateStoreService.Client client = new StateStoreService.Client(proto); return client; } public static FrontendService.Client createBlockingFrontendClient( InetSocketAddress socket) throws IOException { return createBlockingFrontendClient(socket.getAddress().getHostAddress(), socket.getPort()); } public static FrontendService.Client createBlockingFrontendClient( String host, int port) throws IOException { TTransport tr = new TFramedTransport(new TSocket(host, port)); try { tr.open(); } catch (TTransportException e) { LOG.warn("Error creating state store client to " + host + ":" + port); throw new IOException(e); } TProtocol proto = new TBinaryProtocol(tr); FrontendService.Client client = new FrontendService.Client(proto); return client; } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/util/TServers.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.util; import java.io.IOException; import org.apache.log4j.Logger; import org.apache.thrift.TProcessor; import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.server.TNonblockingServer; import org.apache.thrift.server.TServer; import org.apache.thrift.server.TThreadedSelectorServer; import org.apache.thrift.transport.TFramedTransport; import org.apache.thrift.transport.TNonblockingServerSocket; import org.apache.thrift.transport.TNonblockingServerTransport; import org.apache.thrift.transport.TTransportException; /*** * Helper functions for dispatching Thrift servers. */ public class TServers { private final static Logger LOG = Logger.getLogger(TServers.class); private final static int SELECTOR_THREADS = 4; /** * Launch a single threaded nonblocking IO server. All requests to this server will be * handled in a single thread, so its requests should not contain blocking functions. */ public static void launchSingleThreadThriftServer(int port, TProcessor processor) throws IOException { LOG.info("Staring async thrift server of type: " + processor.getClass().toString() + " on port " + port); TNonblockingServerTransport serverTransport; try { serverTransport = new TNonblockingServerSocket(port); } catch (TTransportException e) { throw new IOException(e); } TNonblockingServer.Args serverArgs = new TNonblockingServer.Args(serverTransport); serverArgs.processor(processor); TServer server = new TNonblockingServer(serverArgs); new Thread(new TServerRunnable(server)).start(); } /** * Launch a multi-threaded Thrift server with the given {@code processor}. Note that * internally this creates an expanding thread pool of at most {@code threads} threads, * and requests are queued whenever that thread pool is saturated. */ public static void launchThreadedThriftServer(int port, int threads, TProcessor processor) throws IOException { LOG.info("Staring async thrift server of type: " + processor.getClass().toString() + " on port " + port); TNonblockingServerTransport serverTransport; try { serverTransport = new TNonblockingServerSocket(port); } catch (TTransportException e) { throw new IOException(e); } TThreadedSelectorServer.Args serverArgs = new TThreadedSelectorServer.Args(serverTransport); serverArgs.transportFactory(new TFramedTransport.Factory()); serverArgs.protocolFactory(new TBinaryProtocol.Factory()); serverArgs.processor(processor); serverArgs.selectorThreads(SELECTOR_THREADS); serverArgs.workerThreads(threads); TServer server = new TThreadedSelectorServer(serverArgs); new Thread(new TServerRunnable(server)).start(); } /** * Runnable class to wrap thrift servers in their own thread. */ private static class TServerRunnable implements Runnable { private TServer server; public TServerRunnable(TServer server) { this.server = server; } public void run() { this.server.serve(); } } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/daemon/util/ThriftClientPool.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.util; import java.io.IOException; import java.net.InetSocketAddress; import java.util.HashMap; import org.apache.commons.pool.KeyedPoolableObjectFactory; import org.apache.commons.pool.impl.GenericKeyedObjectPool; import org.apache.commons.pool.impl.GenericKeyedObjectPool.Config; import org.apache.log4j.Logger; import org.apache.thrift.async.TAsyncClient; import org.apache.thrift.async.TAsyncClientManager; import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.protocol.TProtocolFactory; import org.apache.thrift.transport.TNonblockingSocket; import org.apache.thrift.transport.TNonblockingTransport; import edu.berkeley.sparrow.thrift.FrontendService; import edu.berkeley.sparrow.thrift.GetTaskService; import edu.berkeley.sparrow.thrift.InternalService; import edu.berkeley.sparrow.thrift.NodeMonitorService; import edu.berkeley.sparrow.thrift.PongService; import edu.berkeley.sparrow.thrift.SchedulerService; /** A pool of nonblocking thrift async connections. */ public class ThriftClientPool { // Default configurations for underlying pool /** See {@link GenericKeyedObjectPool.Config} */ public static int MIN_IDLE_CLIENTS_PER_ADDR = 0; /** See {@link GenericKeyedObjectPool.Config} */ public static int EVICTABLE_IDLE_TIME_MILLIS = 1000; /** See {@link GenericKeyedObjectPool.Config} */ public static int TIME_BETWEEN_EVICTION_RUNS_MILLIS = -1; /** See {@link GenericKeyedObjectPool.Config} */ public static int MAX_ACTIVE_CLIENTS_PER_ADDR = 16; private static final Logger LOG = Logger.getLogger(ThriftClientPool.class); /** Get the configuration parameters used on the underlying client pool. */ protected static Config getPoolConfig() { Config conf = new Config(); conf.minIdle = MIN_IDLE_CLIENTS_PER_ADDR; conf.maxIdle = -1; conf.minEvictableIdleTimeMillis = EVICTABLE_IDLE_TIME_MILLIS; conf.timeBetweenEvictionRunsMillis = TIME_BETWEEN_EVICTION_RUNS_MILLIS; conf.maxActive = MAX_ACTIVE_CLIENTS_PER_ADDR; conf.whenExhaustedAction = GenericKeyedObjectPool.WHEN_EXHAUSTED_BLOCK; return conf; } /** Clients need to provide an instance of this factory which is capable of creating * the a thrift client of type . */ public interface MakerFactory { public T create(TNonblockingTransport tr, TAsyncClientManager mgr, TProtocolFactory factory); } // MakerFactory implementations for Sparrow interfaces... public static class InternalServiceMakerFactory implements MakerFactory { @Override public InternalService.AsyncClient create(TNonblockingTransport tr, TAsyncClientManager mgr, TProtocolFactory factory) { return new InternalService.AsyncClient(factory, mgr, tr); } } public static class NodeMonitorServiceMakerFactory implements MakerFactory { @Override public NodeMonitorService.AsyncClient create(TNonblockingTransport tr, TAsyncClientManager mgr, TProtocolFactory factory) { return new NodeMonitorService.AsyncClient(factory, mgr, tr); } } public static class SchedulerServiceMakerFactory implements MakerFactory { @Override public SchedulerService.AsyncClient create(TNonblockingTransport tr, TAsyncClientManager mgr, TProtocolFactory factory) { return new SchedulerService.AsyncClient(factory, mgr, tr); } } public static class FrontendServiceMakerFactory implements MakerFactory { @Override public FrontendService.AsyncClient create(TNonblockingTransport tr, TAsyncClientManager mgr, TProtocolFactory factory) { return new FrontendService.AsyncClient(factory, mgr, tr); } } public static class GetTaskServiceMakerFactory implements MakerFactory { @Override public GetTaskService.AsyncClient create(TNonblockingTransport tr, TAsyncClientManager mgr, TProtocolFactory factory) { return new GetTaskService.AsyncClient(factory, mgr, tr); } } public static class PongServiceMakerFactory implements MakerFactory { @Override public PongService.AsyncClient create(TNonblockingTransport tr, TAsyncClientManager mgr, TProtocolFactory factory) { return new PongService.AsyncClient(factory, mgr, tr); } } private class PoolFactory implements KeyedPoolableObjectFactory { // Thrift clients do not expose their underlying transports, so we track them // separately here to let us call close() on the transport associated with a // particular client. private HashMap transports = new HashMap(); private MakerFactory maker; public PoolFactory(MakerFactory maker) { this.maker = maker; } @Override public void destroyObject(InetSocketAddress socket, T client) throws Exception { transports.get(client).close(); transports.remove(client); } @Override public T makeObject(InetSocketAddress socket) throws Exception { TNonblockingTransport nbTr = new TNonblockingSocket( socket.getAddress().getHostAddress(), socket.getPort()); TProtocolFactory factory = new TBinaryProtocol.Factory(); T client = maker.create(nbTr, clientManager, factory); transports.put(client, nbTr); return client; } @Override public boolean validateObject(InetSocketAddress socket, T client) { return transports.get(client).isOpen(); } @Override public void activateObject(InetSocketAddress socket, T client) throws Exception { // Nothing to do here } @Override public void passivateObject(InetSocketAddress socket, T client) throws Exception { // Nothing to do here } } /** Pointer to shared selector thread. */ TAsyncClientManager clientManager; /** Underlying object pool. */ private GenericKeyedObjectPool pool; public ThriftClientPool(MakerFactory maker) { pool = new GenericKeyedObjectPool(new PoolFactory(maker), getPoolConfig()); try { clientManager = new TAsyncClientManager(); } catch (IOException e) { LOG.fatal(e); } } /** Constructor (for unit tests) which overrides default configuration. */ protected ThriftClientPool(MakerFactory maker, Config conf) { this(maker); pool.setConfig(conf); } /** Borrows a client from the pool. */ public T borrowClient(InetSocketAddress socket) throws Exception { return pool.borrowObject(socket); } /** Returns a client to the pool. */ public void returnClient(InetSocketAddress socket, T client) throws Exception { pool.returnObject(socket, client); } public int getNumActive(InetSocketAddress socket) { return pool.getNumActive(socket); } public int getNumIdle(InetSocketAddress socket) { return pool.getNumIdle(socket); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/examples/BackendBenchmarkProfiler.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.examples; import java.util.ArrayList; import java.util.Collections; import java.util.LinkedList; import java.util.Random; import java.util.concurrent.BlockingQueue; import java.util.HashMap; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import joptsimple.OptionParser; import joptsimple.OptionSet; import org.apache.commons.math.stat.descriptive.DescriptiveStatistics; /** * A standalone script for profiling benchmark capacity on a given machine. * * This is useful for determining how much capacity a machine has for our benchmark. i.e. * what is the maximum rate of tasks-per-second the machine can sustain. We determine * this experimentally since it depends on several factors - in particular the speed of * the CPU and the OS scheduling policy. See {@code main()} and {code runExperiment()} * for more information on what is actually run here. * * See {@link runExperiment()} for details. */ public class BackendBenchmarkProfiler { public static final int DEFAULT_BENCHMARK_ITERATIONS = 4; public static final int DEFAULT_BENCHMARK_ID = 1; public static final int DEFAULT_BUCKET_SIZE_S = 2; public static final int DEFAULT_TRAIL_LENGTH_S = 60; public static final double DEFAULT_START_RATE = 10; public static final double DEFAULT_END_RATE = 30; public static final double DEFAULT_RATE_STEP = 2; public static int benchmarkIterations = DEFAULT_BENCHMARK_ITERATIONS; public static int benchmarkId = DEFAULT_BENCHMARK_ID; public static int bucketSizeS = DEFAULT_BUCKET_SIZE_S; public static int trialLengthS = DEFAULT_TRAIL_LENGTH_S; public static double startRate = DEFAULT_START_RATE; public static double endRate = DEFAULT_END_RATE; public static double rateStep = DEFAULT_RATE_STEP; private static class BenchmarkRunnable implements Runnable { private HashMap> runTimes; private HashMap> waitTimes; private long timeCreated; private long bucketGranularity; /** * A runnable which runs a floating point benchmark and updates the global list * of runtimes with information about how long it took. Run time is assessed * as the difference between when the runnable is instantiated and when it finishes * the benchmark loop and exists. This might include queueing in the executor. */ private BenchmarkRunnable(HashMap> runTimes, HashMap> waitTimes, long granularity) { this.runTimes = runTimes; this.waitTimes = waitTimes; timeCreated = System.currentTimeMillis(); bucketGranularity = granularity; } @Override public void run() { long start = System.currentTimeMillis(); Random r = new Random(); ProtoBackend.runBenchmark(benchmarkId, benchmarkIterations, r); long end = System.currentTimeMillis(); long timeIndex = timeCreated - (timeCreated % bucketGranularity); synchronized(runTimes) { if (!runTimes.containsKey((timeIndex))) { runTimes.put(timeIndex, new LinkedList()); } runTimes.get(timeIndex).add(end - timeCreated); } synchronized(waitTimes) { if (!waitTimes.containsKey((timeIndex))) { waitTimes.put(timeIndex, new LinkedList()); } waitTimes.get(timeIndex).add(start - timeCreated); } } } /** * This generates an arrival delay according to an exponential distribution with * average 1\{@code lambda}. Generating arrival delays from such a distribution creates * a Poission process with an average arrival rate of {@code lambda} events per second. */ public static double generateInterarrivalDelay(Random r, double lambda) { double u = r.nextDouble(); return -Math.log(u)/lambda; } /** * Run an experiment which launches tasks at {@code arrivalRate} for {@code durationMs} * seconds and waits for all tasks to finish. Return a {@link DescriptiveStatistics} * object which contains stats about the distribution of task finish times. Tasks * are executed in a thread pool which contains at least {@code corePoolSize} threads * and grows up to {@code maxPoolSize} threads (growing whenever a new task arrives * and all existing threads are used). * * Setting {@code maxPoolSize} to a very large number enacts time sharing, while * setting it equal to {@code corePoolSize} creates a fixed size task pool. * * The derivative of task finishes is tracked by bucketing tasks at the granularity * {@code bucketSize}. If it is detected that task finishes are increasing in an * unbounded fashion (i.e. infinite queuing is occuring) a {@link RuntimeException} * is thrown. */ public static void runExperiment(double arrivalRate, int corePoolSize, int maxPoolSize, long bucketSize, long durationMs, DescriptiveStatistics runTimes, DescriptiveStatistics waitTimes) { long startTime = System.currentTimeMillis(); long keepAliveTime = 10; Random r = new Random(); BlockingQueue runQueue = new LinkedBlockingQueue(); ExecutorService threadPool = new ThreadPoolExecutor( corePoolSize, maxPoolSize, keepAliveTime, TimeUnit.MILLISECONDS, runQueue); if (maxPoolSize == Integer.MAX_VALUE) { threadPool = Executors.newCachedThreadPool(); } // run times indexed by bucketing interval HashMap> bucketedRunTimes = new HashMap>(); // wait times indexed by bucketing interval HashMap> bucketedWaitTimes = new HashMap>(); /* * This is a little tricky. * * We want to generate inter-arrival delays according to the arrival rate specified. * The simplest option would be to generate an arrival delay and then sleep() for it * before launching each task. This has in issue, however: sleep() might wait * several ms longer than we ask it to. When task arrival rates get really fast, * i.e. one task every 10 ms, sleeping an additional few ms will mean we launch * tasks at a much lower rate than requested. * * Instead, we keep track of task launches in a way that does not depend on how long * sleep() actually takes. We still might have tasks launch slightly after their * scheduled launch time, but we will not systematically "fall behind" due to * compounding time lost during sleep()'s; */ long currTime = startTime; while (true) { long delay = (long) (generateInterarrivalDelay(r, arrivalRate) * 1000); // When should the next task launch, based on when the last task was scheduled // to launch. long nextTime = currTime + delay; // Diff gives how long we should wait for the next scheduled task. The difference // may be negative if our last sleep() lasted too long relative to the inter-arrival // delay based on the last scheduled launch, so we round up to 0 in that case. long diff = Math.max(0, nextTime - System.currentTimeMillis()); currTime = nextTime; if (diff > 0) { try { Thread.sleep(diff); } catch (InterruptedException e) { System.err.println("Unexpected interruption!"); System.exit(1); } } threadPool.submit((new BenchmarkRunnable(bucketedRunTimes, bucketedWaitTimes, bucketSize))); if (System.currentTimeMillis() > startTime + durationMs) { break; } } threadPool.shutdown(); try { threadPool.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS); } catch (InterruptedException e1) { System.err.println("Unexpected interruption!"); System.exit(1); } List times = new ArrayList(bucketedRunTimes.keySet()); Collections.sort(times); HashMap bucketStats = new HashMap(); // Remove first and last buckets since they will not be completely full to do // discretization. times.remove(0); times.remove(times.size() - 1); for(Long time : times) { DescriptiveStatistics stats = new DescriptiveStatistics(); List list = bucketedRunTimes.get(time); for (Long l : list) { stats.addValue(l); runTimes.addValue(l); } bucketStats.put(time, stats); List waitList = bucketedWaitTimes.get(time); for (Long l : waitList) { waitTimes.addValue(l); } } int size = bucketStats.size(); if (size >= 2) { DescriptiveStatistics first = bucketStats.get(times.get(0)); DescriptiveStatistics last = bucketStats.get(times.get(times.size() - 1)); double increase = last.getPercentile(50) / first.getPercentile(50); // A simple heuristic, if the median runtime went up by five from the first to // last complete bucket, we assume we are seeing unbounded growth if (increase > 5.0) { throw new RuntimeException("Queue not in steady state: " + last.getMean() + " vs " + first.getMean()); } } } /** * Run the benchmark at increasingly high arrival rates until infinite queuing is * detected. This performs two trials, one where tasks are launched in a fixed-sized * pool and the other where tasks are not queued and always launched in parallel. * The statistics for runtime vs. arrival rate are printed out for each of the two * trials. */ public static void main(String[] args) throws InterruptedException, ExecutionException { OptionParser parser = new OptionParser(); parser.accepts("t", "size of core thread pool"). withRequiredArg().ofType(Integer.class); parser.accepts("b", "benchmark ID"). withRequiredArg().ofType(Integer.class); parser.accepts("i", "number of benchmark iterations to run"). withRequiredArg().ofType(Integer.class); parser.accepts("s", "bucket size in seconds"). withRequiredArg().ofType(Integer.class); parser.accepts("d", " experiment duration in seconds"). withRequiredArg().ofType(Integer.class); parser.accepts("r", "initial rate of task launches"). withRequiredArg().ofType(Double.class); parser.accepts("f", "final rate of task launches"). withRequiredArg().ofType(Double.class); parser.accepts("k", "step size of increased rates"). withRequiredArg().ofType(Double.class); OptionSet options = parser.parse(args); int coreThreadPoolSize = 4; if (options.has("t")) { coreThreadPoolSize = (Integer) options.valueOf("t"); } if (options.has("b")) { benchmarkId = (Integer) options.valueOf("b"); } if (options.has("i")) { benchmarkIterations = (Integer) options.valueOf("i"); } if (options.has("s")) { bucketSizeS = (Integer) options.valueOf("s"); } if (options.has("d")) { trialLengthS = (Integer) options.valueOf("d"); } if (options.has("r")) { startRate = (Double) options.valueOf("r"); } if (options.has("f")) { endRate = (Double) options.valueOf("f"); } if (options.has("k")) { rateStep = (Double) options.valueOf("k"); } // Run the benchmark a few times to let JIT kick in int bucketSizeMs = bucketSizeS * 1000; int trialLengthMs = trialLengthS * 1000; runExperiment(15.0, coreThreadPoolSize, coreThreadPoolSize, bucketSizeMs, trialLengthMs, new DescriptiveStatistics(), new DescriptiveStatistics()); runExperiment(15.0, coreThreadPoolSize, coreThreadPoolSize, bucketSizeMs, trialLengthMs, new DescriptiveStatistics(), new DescriptiveStatistics()); for (double i = startRate; i <= endRate; i = i + rateStep) { try { DescriptiveStatistics runTimes = new DescriptiveStatistics(); DescriptiveStatistics waitTimes = new DescriptiveStatistics(); runExperiment(i, coreThreadPoolSize, coreThreadPoolSize, bucketSizeMs, trialLengthMs, runTimes, waitTimes); System.out.println(i + " run " + runTimes.getPercentile(50.0) + " " + runTimes.getPercentile(95) + " " + runTimes.getPercentile(99)); System.out.println(i + " wait " + waitTimes.getPercentile(50.0) + " " + waitTimes.getPercentile(95) + " " + waitTimes.getPercentile(99)); } catch (RuntimeException e) { System.out.println(e); break; } } for (double i = startRate; i <= endRate; i = i + rateStep) { try { DescriptiveStatistics runTimes = new DescriptiveStatistics(); DescriptiveStatistics waitTimes = new DescriptiveStatistics(); runExperiment(i, coreThreadPoolSize, Integer.MAX_VALUE, bucketSizeMs, trialLengthMs, runTimes, waitTimes); System.out.println(i + " run " + runTimes.getPercentile(50.0) + " " + runTimes.getPercentile(95) + " " + runTimes.getPercentile(99)); System.out.println(i + " wait " + waitTimes.getPercentile(50.0) + " " + waitTimes.getPercentile(95) + " " + waitTimes.getPercentile(99)); } catch (RuntimeException e) { System.out.println(e); break; } } } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/examples/FairnessTestingFrontend.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.examples; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Random; import java.util.concurrent.atomic.AtomicInteger; import joptsimple.OptionParser; import joptsimple.OptionSet; import org.apache.commons.configuration.Configuration; import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.thrift.TException; import edu.berkeley.sparrow.api.SparrowFrontendClient; import edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift; import edu.berkeley.sparrow.daemon.util.Serialization; import edu.berkeley.sparrow.thrift.FrontendService; import edu.berkeley.sparrow.thrift.TFullTaskId; import edu.berkeley.sparrow.thrift.TPlacementPreference; import edu.berkeley.sparrow.thrift.TTaskSpec; import edu.berkeley.sparrow.thrift.TUserGroupInfo; /** * Frontend for the prototype implementation. */ public class FairnessTestingFrontend implements FrontendService.Iface { /** Jobs/second during warmup period. */ public static final double DEFAULT_WARMUP_JOB_ARRIVAL_RATE_S = 10; /** Duration of warmup period. */ public static final int DEFAULT_WARMUP_S = 10; /** Amount of time to wait for queues to drain once warmup period is over. */ public static final int DEFAULT_POST_WARMUP_S = 60; /** Amount of time to launch tasks for (not including the warmup period). */ public static final int DEFAULT_EXPERIMENT_S = 300; public static final double DEFAULT_JOB_ARRIVAL_RATE_S = 10; // Jobs/second public static final int DEFAULT_TASKS_PER_JOB = 1; // Tasks/job // Type of benchmark to run, see ProtoBackend static constant for benchmark types public static final int DEFAULT_TASK_BENCHMARK = ProtoBackend.BENCHMARK_TYPE_FP_CPU; public static final int DEFAULT_BENCHMARK_ITERATIONS = 1000; // # of benchmark iterations /** * The default number of preferred nodes for each task. 0 signals that tasks are * unconstrained. */ public static final int DEFAULT_NUM_PREFERRED_NODES = 0; /** * Configuration parameter name for the set of backends (used to set preferred nodes for * tasks). */ public static final String BACKENDS = "backends"; /** * Configuration parameter name for the set of users. Users should be specified by three * values: a user id, an integral priority, and an integral demand, where the demand of each user * is specified relative to the demands of other users. These three values should be semi-colon * separated. */ public static final String USERS = "users"; /** * Default application name. */ public static final String APPLICATION_ID = "testApp"; private static final Logger LOG = Logger.getLogger(FairnessTestingFrontend.class); public final static long startTime = System.currentTimeMillis(); public static AtomicInteger tasksLaunched = new AtomicInteger(0); /** A runnable that launches a scheduling request. */ private class JobLaunchRunnable implements Runnable { private List request; private SparrowFrontendClient client; UserInfo user; public JobLaunchRunnable(List request, UserInfo user, SparrowFrontendClient client) { this.request = request; this.client = client; this.user = user; } @Override public void run() { long start = System.currentTimeMillis(); TUserGroupInfo userInfo = new TUserGroupInfo(user.user, "*", user.priority); try { client.submitJob(APPLICATION_ID, request, userInfo); LOG.debug("Submitted job: " + request + " for user " + userInfo); } catch (TException e) { LOG.error("Scheduling request failed!", e); } long end = System.currentTimeMillis(); LOG.debug("Scheduling request duration " + (end - start)); } } public static class UserInfo { public String user; public int cumulativeWeight; public int priority; /** Used for debugging purposes, to ensure user weights are being used correctly. */ public int totalJobsLaunched; public UserInfo(String user, int cumulativeWeight, int priority) { this.user = user; this.cumulativeWeight = cumulativeWeight; this.priority = priority; this.totalJobsLaunched = 0; } } public static class SubExperiment { public List users; public int durationSeconds; /** * Rate at which jobs are arriving across all users. At each job launch, a random * user is selected based on the user's weight. */ double arrivalRate; /** Total weight across all users. Used to randomly select a user for each job. */ int totalWeight; public SubExperiment(List users, int durationMilliseconds, double arrivalRate) { this.users = new ArrayList(users); this.durationSeconds = durationMilliseconds; this.arrivalRate = arrivalRate; totalWeight = 0; for (UserInfo user : users) { if (user.cumulativeWeight > totalWeight) { totalWeight = user.cumulativeWeight; } } } } public List generateJob(int numTasks, int numPreferredNodes, List backends, int benchmarkId, int benchmarkIterations) { // Pack task parameters ByteBuffer message = ByteBuffer.allocate(8); message.putInt(benchmarkId); message.putInt(benchmarkIterations); List out = new ArrayList(); for (int taskId = 0; taskId < numTasks; taskId++) { TTaskSpec spec = new TTaskSpec(); spec.setTaskId(Integer.toString((new Random().nextInt()))); spec.setMessage(message.array()); if (numPreferredNodes > 0) { Collections.shuffle(backends); TPlacementPreference preference = new TPlacementPreference(); for (int i = 0; i < numPreferredNodes; i++) { preference.addToNodes(backends.get(i)); } spec.setPreference(preference); } out.add(spec); } return out; } public void run(String[] args) { try { OptionParser parser = new OptionParser(); parser.accepts("c", "configuration file").withRequiredArg().ofType(String.class); parser.accepts("help", "print help statement"); OptionSet options = parser.parse(args); if (options.has("help")) { parser.printHelpOn(System.out); System.exit(-1); } // Logger configuration: log to the console BasicConfigurator.configure(); LOG.setLevel(Level.DEBUG); Configuration conf = new PropertiesConfiguration(); if (options.has("c")) { String configFile = (String) options.valueOf("c"); conf = new PropertiesConfiguration(configFile); } double warmup_lambda = conf.getDouble("warmup_job_arrival_rate_s", DEFAULT_WARMUP_JOB_ARRIVAL_RATE_S); int warmup_duration_s = conf.getInt("warmup_s", DEFAULT_WARMUP_S); int post_warmup_s = conf.getInt("post_warmup_s", DEFAULT_POST_WARMUP_S); // We use this to represent the the rate to fully load the cluster. This is a hack. double lambda = conf.getDouble("job_arrival_rate_s", DEFAULT_JOB_ARRIVAL_RATE_S); int experiment_duration_s = conf.getInt("experiment_s", DEFAULT_EXPERIMENT_S); LOG.debug("Using arrival rate of " + lambda + " tasks per second and running experiment for " + experiment_duration_s + " seconds."); int tasksPerJob = conf.getInt("tasks_per_job", DEFAULT_TASKS_PER_JOB); int numPreferredNodes = conf.getInt("num_preferred_nodes", DEFAULT_NUM_PREFERRED_NODES); LOG.debug("Using " + numPreferredNodes + " preferred nodes for each task."); int benchmarkIterations = conf.getInt("benchmark.iterations", DEFAULT_BENCHMARK_ITERATIONS); int benchmarkId = conf.getInt("benchmark.id", DEFAULT_TASK_BENCHMARK); List backends = new ArrayList(); if (numPreferredNodes > 0) { /* Attempt to parse the list of slaves, which we'll need to (randomly) select preferred * nodes. */ if (!conf.containsKey(BACKENDS)) { LOG.fatal("Missing configuration backend list, which is needed to randomly select " + "preferred nodes (num_preferred_nodes set to " + numPreferredNodes + ")"); } for (String node : conf.getStringArray(BACKENDS)) { backends.add(node); } if (backends.size() < numPreferredNodes) { LOG.fatal("Number of backends smaller than number of preferred nodes!"); } } List experiments = new ArrayList(); double fullyUtilizedArrivalRate = lambda; // For the first twenty seconds, the first user submits at a rate to fully utilize the cluster. List onlyUser0 = new ArrayList(); onlyUser0.add(new UserInfo("user0", 1, 0)); experiments.add(new SubExperiment(onlyUser0, 20, fullyUtilizedArrivalRate)); // For the next 10 seconds, user1 increases her rate to 25% of the cluster. List user1QuarterDemand = new ArrayList(); user1QuarterDemand.add(new UserInfo("user0", 4, 0)); user1QuarterDemand.add(new UserInfo("user1", 5, 0)); experiments.add(new SubExperiment(user1QuarterDemand, 10, 1.25 * fullyUtilizedArrivalRate)); // For the next 10 seconds, user 1 increases her rate to 50% of the cluster (using exactly // her share, but no more). List user1HalfDemand = new ArrayList(); user1HalfDemand.add(new UserInfo("user0", 2, 0)); user1HalfDemand.add(new UserInfo("user1", 3, 0)); experiments.add(new SubExperiment(user1HalfDemand, 10, 1.5 * fullyUtilizedArrivalRate)); // Next user 1 goes back down to 25%. experiments.add(new SubExperiment(user1QuarterDemand, 10, 1.25 * fullyUtilizedArrivalRate)); // Finally user 1 goes back to 0. experiments.add(new SubExperiment(onlyUser0, 20, fullyUtilizedArrivalRate)); SparrowFrontendClient client = new SparrowFrontendClient(); int schedulerPort = conf.getInt("scheduler_port", SchedulerThrift.DEFAULT_SCHEDULER_THRIFT_PORT); client.initialize(new InetSocketAddress("localhost", schedulerPort), APPLICATION_ID, this); if (warmup_duration_s > 0) { List warmupExperiment = new ArrayList(); List warmupUsers = new ArrayList(); warmupUsers.add(new UserInfo("warmupUser", 1, 0)); warmupExperiment.add(new SubExperiment(warmupUsers, warmup_duration_s, warmup_lambda)); LOG.debug("Warming up for " + warmup_duration_s + " seconds at arrival rate of " + warmup_lambda + " jobs per second"); launchTasks(warmupExperiment, tasksPerJob, numPreferredNodes, benchmarkIterations, benchmarkId, backends, client); LOG.debug("Waiting for queues to drain after warmup (waiting " + post_warmup_s + " seconds)"); Thread.sleep(post_warmup_s * 1000); } LOG.debug("Launching experiment for " + experiment_duration_s + " seconds"); launchTasks(experiments, tasksPerJob, numPreferredNodes, benchmarkIterations, benchmarkId, backends, client); } catch (Exception e) { LOG.error("Fatal exception", e); } } private void launchTasks(List experiments, int tasksPerJob, int numPreferredNodes, int benchmarkIterations, int benchmarkId, List backends, SparrowFrontendClient client) throws InterruptedException { /* This is a little tricky. * * We want to generate inter-arrival delays according to the arrival rate specified. * The simplest option would be to generate an arrival delay and then sleep() for it * before launching each task. However, this is problematic because sleep() might wait * several ms longer than we ask it to. When task arrival rates get really fast, * i.e. one task every 10 ms, sleeping an additional few ms will mean we launch * tasks at a much lower rate than requested. * * Instead, we keep track of task launches in a way that does not depend on how long * sleep() actually takes. We still might have tasks launch slightly after their * scheduled launch time, but we will not systematically "fall behind" due to * compounding time lost during sleep()'s; */ // Used to determine which user to launch tasks for. The frontend rotates through users // in a deterministic order. int userIndex = 0; for (SubExperiment experiment : experiments) { // Store this as a double so we don't end up perpetually behind if the launch rate // includes some fractional number of milliseconds. double mostRecentLaunch = System.currentTimeMillis(); long end = System.currentTimeMillis() + experiment.durationSeconds * 1000; LOG.debug("Launching subexperiment with " + experiment.users.size() + " users for " + experiment.durationSeconds + " seconds"); while (System.currentTimeMillis() < end) { // Lambda is the arrival rate in S, so we need to multiply the result here by // 1000 to convert to ms. double delay = 1000 / experiment.arrivalRate; double curLaunch = mostRecentLaunch + delay; long toWait = Math.max(0, (long) curLaunch - System.currentTimeMillis()); mostRecentLaunch = curLaunch; if (toWait == 0) { LOG.warn("Lanching job after start time in generated workload."); } Thread.sleep(toWait); UserInfo user = null; for (UserInfo potentialUser : experiment.users) { if ((userIndex % experiment.totalWeight) < potentialUser.cumulativeWeight) { user = potentialUser; break; } } userIndex++; ++user.totalJobsLaunched; LOG.debug("Launching " + tasksPerJob + " task job for user " + user.user + " (" + user.totalJobsLaunched + " total jobs launched for this user)"); Runnable runnable = new JobLaunchRunnable( generateJob(tasksPerJob, numPreferredNodes, backends, benchmarkId, benchmarkIterations), user, client); new Thread(runnable).start(); int launched = tasksLaunched.addAndGet(1); double launchRate = (double) launched * 1000.0 / (System.currentTimeMillis() - startTime); LOG.debug("Aggregate launch rate: " + launchRate); } } } @Override public void frontendMessage(TFullTaskId taskId, int status, ByteBuffer message) throws TException { // We don't use messages here, so just log it. LOG.debug("Got unexpected message: " + Serialization.getByteBufferContents(message)); } public static void main(String[] args) { new FairnessTestingFrontend().run(args); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/examples/HeterogeneousFrontend.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.examples; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Random; import java.util.concurrent.atomic.AtomicInteger; import joptsimple.OptionParser; import joptsimple.OptionSet; import org.apache.commons.configuration.Configuration; import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.thrift.TException; import edu.berkeley.sparrow.api.SparrowFrontendClient; import edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift; import edu.berkeley.sparrow.daemon.util.Serialization; import edu.berkeley.sparrow.thrift.FrontendService; import edu.berkeley.sparrow.thrift.TFullTaskId; import edu.berkeley.sparrow.thrift.TPlacementPreference; import edu.berkeley.sparrow.thrift.TTaskSpec; import edu.berkeley.sparrow.thrift.TUserGroupInfo; /** * Frontend for the prototype implementation. */ public class HeterogeneousFrontend implements FrontendService.Iface { /** Jobs/second during warmup period. */ public static final double DEFAULT_WARMUP_JOB_ARRIVAL_RATE_S = 10; /** Duration of warmup period. */ public static final int DEFAULT_WARMUP_S = 10; /** Amount of time to wait for queues to drain once warmup period is over. */ public static final int DEFAULT_POST_WARMUP_S = 60; /** Amount of time to launch tasks for (not including the warmup period). */ public static final int DEFAULT_EXPERIMENT_S = 300; public static final double DEFAULT_JOB_ARRIVAL_RATE_S = 10; // Jobs/second public static final int DEFAULT_TASKS_PER_JOB = 1; // Tasks/job // Type of benchmark to run, see ProtoBackend static constant for benchmark types public static final int DEFAULT_TASK_BENCHMARK = ProtoBackend.BENCHMARK_TYPE_FP_CPU; public static final int DEFAULT_BENCHMARK_ITERATIONS = 1000; // # of benchmark iterations /** * The default number of preferred nodes for each task. 0 signals that tasks are * unconstrained. */ public static final int DEFAULT_NUM_PREFERRED_NODES = 0; /** * Configuration parameter name for the set of backends (used to set preferred nodes for * tasks). */ public static final String BACKENDS = "backends"; /** * Configuration parameter name for the set of users. Users should be specified by three * values: a user id, an integral priority, and an integral demand, where the demand of each user * is specified relative to the demands of other users. These three values should be semi-colon * separated. */ public static final String USERS = "users"; /** * Default application name. */ public static final String APPLICATION_ID = "testApp"; private static final Logger LOG = Logger.getLogger(HeterogeneousFrontend.class); public final static long startTime = System.currentTimeMillis(); public static AtomicInteger tasksLaunched = new AtomicInteger(0); /** A runnable which Spawns a new thread to launch a scheduling request. */ private class JobLaunchRunnable implements Runnable { private List request; private SparrowFrontendClient client; UserInfo user; public JobLaunchRunnable(List request, UserInfo user, SparrowFrontendClient client) { this.request = request; this.client = client; this.user = user; } @Override public void run() { long start = System.currentTimeMillis(); TUserGroupInfo userInfo = new TUserGroupInfo(user.user, "*", 0); try { client.submitJob(APPLICATION_ID, request, userInfo); LOG.debug("Submitted job: " + request + " for user " + userInfo); } catch (TException e) { LOG.error("Scheduling request failed!", e); } long end = System.currentTimeMillis(); LOG.debug("Scheduling request duration " + (end - start)); } } public static class UserInfo { public String user; public int cumulativeWeight; public int taskDuration; /** Used for debugging purposes, to ensure user weights are being used correctly. */ public int totalTasksLaunched; /** Total weight assigned across all users. */ public static int totalWeight = 0; public UserInfo(String user, int weight, int taskDuration) { this.user = user; this.cumulativeWeight = totalWeight + weight; totalWeight = this.cumulativeWeight; this.taskDuration = taskDuration; this.totalTasksLaunched = 0; } } public List generateJob(int numTasks, int numPreferredNodes, List backends, int benchmarkId, int benchmarkIterations) { // Pack task parameters ByteBuffer message = ByteBuffer.allocate(8); message.putInt(benchmarkId); message.putInt(benchmarkIterations); List out = new ArrayList(); for (int taskId = 0; taskId < numTasks; taskId++) { TTaskSpec spec = new TTaskSpec(); spec.setTaskId(Integer.toString((new Random().nextInt()))); spec.setMessage(message.array()); if (numPreferredNodes > 0) { Collections.shuffle(backends); TPlacementPreference preference = new TPlacementPreference(); for (int i = 0; i < numPreferredNodes; i++) { preference.addToNodes(backends.get(i)); } spec.setPreference(preference); } out.add(spec); } return out; } /** * Generates exponentially distributed interarrival delays. */ public double generateInterarrivalDelay(Random r, double lambda) { double u = r.nextDouble(); return -Math.log(u)/lambda; } public void run(String[] args) { try { OptionParser parser = new OptionParser(); parser.accepts("c", "configuration file").withRequiredArg().ofType(String.class); parser.accepts("help", "print help statement"); OptionSet options = parser.parse(args); if (options.has("help")) { parser.printHelpOn(System.out); System.exit(-1); } // Logger configuration: log to the console BasicConfigurator.configure(); LOG.setLevel(Level.DEBUG); Configuration conf = new PropertiesConfiguration(); if (options.has("c")) { String configFile = (String) options.valueOf("c"); conf = new PropertiesConfiguration(configFile); } double warmupLambda = conf.getDouble("warmup_job_arrival_rate_s", DEFAULT_WARMUP_JOB_ARRIVAL_RATE_S); int warmupDurationS = conf.getInt("warmup_s", DEFAULT_WARMUP_S); int postWarmupS = conf.getInt("post_warmup_s", DEFAULT_POST_WARMUP_S); double lambda = conf.getDouble("job_arrival_rate_s", DEFAULT_JOB_ARRIVAL_RATE_S); int experimentDurationS = conf.getInt("experiment_s", DEFAULT_EXPERIMENT_S); LOG.debug("Using arrival rate of " + lambda + " tasks per second and running experiment for " + experimentDurationS + " seconds."); int tasksPerJob = conf.getInt("tasks_per_job", DEFAULT_TASKS_PER_JOB); int numPreferredNodes = conf.getInt("num_preferred_nodes", DEFAULT_NUM_PREFERRED_NODES); LOG.debug("Using " + numPreferredNodes + " preferred nodes for each task."); int benchmarkIterations = conf.getInt("benchmark.iterations", DEFAULT_BENCHMARK_ITERATIONS); int benchmarkId = conf.getInt("benchmark.id", DEFAULT_TASK_BENCHMARK); List backends = new ArrayList(); if (numPreferredNodes > 0) { /* Attempt to parse the list of slaves, which we'll need to (randomly) select preferred * nodes. */ if (!conf.containsKey(BACKENDS)) { LOG.fatal("Missing configuration backend list, which is needed to randomly select " + "preferred nodes (num_preferred_nodes set to " + numPreferredNodes + ")"); } for (String node : conf.getStringArray(BACKENDS)) { backends.add(node); } if (backends.size() < numPreferredNodes) { LOG.fatal("Number of backends smaller than number of preferred nodes!"); } } List users = new ArrayList(); if (conf.containsKey(USERS)) { for (String userSpecification : conf.getStringArray(USERS)) { LOG.debug("Reading user specification: " + userSpecification); String[] parts = userSpecification.split(":"); if (parts.length != 3) { LOG.error("Unexpected user specification string: " + userSpecification + "; ignoring user"); continue; } users.add(new UserInfo(parts[0], Integer.parseInt(parts[1]), Integer.parseInt(parts[2]))); } } if (users.size() == 0) { // Add a dummy user. users.add(new UserInfo("defaultUser", 1, 0)); } SparrowFrontendClient client = new SparrowFrontendClient(); int schedulerPort = conf.getInt("scheduler_port", SchedulerThrift.DEFAULT_SCHEDULER_THRIFT_PORT); client.initialize(new InetSocketAddress("localhost", schedulerPort), APPLICATION_ID, this); if (warmupDurationS > 0) { LOG.debug("Warming up for " + warmupDurationS + " seconds at arrival rate of " + warmupLambda + " jobs per second"); launchTasks(users, warmupLambda, warmupDurationS, tasksPerJob, numPreferredNodes, benchmarkIterations, benchmarkId, backends, client); LOG.debug("Waiting for queues to drain after warmup (waiting " + postWarmupS + " seconds)"); Thread.sleep(postWarmupS * 1000); } LOG.debug("Launching experiment for " + experimentDurationS + " seconds"); launchTasks(users, lambda, experimentDurationS, tasksPerJob, numPreferredNodes, benchmarkIterations, benchmarkId, backends, client); } catch (Exception e) { LOG.error("Fatal exception", e); } } private void launchTasks(List users, double lambda, int launch_duration_s, int tasksPerJob, int numPreferredNodes, int benchmarkIterations, int benchmarkId, List backends, SparrowFrontendClient client) throws InterruptedException { /* This is a little tricky. * * We want to generate inter-arrival delays according to the arrival rate specified. * The simplest option would be to generate an arrival delay and then sleep() for it * before launching each task. However, this is problematic because sleep() might wait * several ms longer than we ask it to. When task arrival rates get really fast, * i.e. one task every 10 ms, sleeping an additional few ms will mean we launch * tasks at a much lower rate than requested. * * Instead, we keep track of task launches in a way that does not depend on how long * sleep() actually takes. We still might have tasks launch slightly after their * scheduled launch time, but we will not systematically "fall behind" due to * compounding time lost during sleep()'s; */ //Random r = new Random(); double mostRecentLaunch = System.currentTimeMillis(); long end = System.currentTimeMillis() + launch_duration_s * 1000; Random r = new Random(); // Used to determine which user's task to run next. Start from a random place so // all of the frontends don't end up synchronized. int userIndex = r.nextInt(UserInfo.totalWeight); LOG.debug("Starting with user index " + userIndex); while (System.currentTimeMillis() < end) { // Lambda is the arrival rate in S, so we need to multiply the result here by // 1000 to convert to ms. double delay = 1000 / lambda; double curLaunch = mostRecentLaunch + delay; long toWait = Math.max(0, (long) curLaunch - System.currentTimeMillis()); mostRecentLaunch = curLaunch; if (toWait == 0) { LOG.warn("Lanching task after start time in generated workload."); } Thread.sleep(toWait); // Deterministically select which user's task to run, according to weight. UserInfo user = null; for (UserInfo potentialUser : users) { if ((userIndex % UserInfo.totalWeight) < potentialUser.cumulativeWeight) { user = potentialUser; break; } } assert(user != null); ++userIndex; ++user.totalTasksLaunched; LOG.debug("Launching task for user " + user.user + " with duration " + user.taskDuration + " (" + user.totalTasksLaunched + " total tasks launched for this user)"); Runnable runnable = new JobLaunchRunnable( generateJob(tasksPerJob, numPreferredNodes, backends, benchmarkId, user.taskDuration), user, client); new Thread(runnable).start(); int launched = tasksLaunched.addAndGet(1); double launchRate = (double) launched * 1000.0 / (System.currentTimeMillis() - startTime); LOG.debug("Aggregate launch rate: " + launchRate); } } @Override public void frontendMessage(TFullTaskId taskId, int status, ByteBuffer message) throws TException { // We don't use messages here, so just log it. LOG.debug("Got unexpected message: " + Serialization.getByteBufferContents(message)); } public static void main(String[] args) { new HeterogeneousFrontend().run(args); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/examples/PingClient.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.examples; import java.io.IOException; import java.net.InetSocketAddress; import java.net.Socket; import java.net.UnknownHostException; public class PingClient { public static void main(String[] args) throws UnknownHostException, IOException { String server = args[0]; Socket socket = new Socket(); socket.setTcpNoDelay(true); socket.connect(new InetSocketAddress(server, 12345)); byte[] buff = new byte[1000]; while (true) { long t0 = System.nanoTime(); socket.getOutputStream().write("PING".getBytes()); socket.getInputStream().read(buff); double diffMs = (System.nanoTime() - t0) / (1000.0 * 1000.0); System.out.println("GOT: " + new String(buff)); System.out.println(diffMs + " milliseconds"); } } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/examples/PongServer.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.examples; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; public class PongServer { public static void main(String[] args) throws IOException { ServerSocket serverSocket = new ServerSocket(12345); while (true) { Socket sock = serverSocket.accept(); sock.setTcpNoDelay(true); new Thread(new PongServerRunnable(sock)).start(); } } private static class PongServerRunnable implements Runnable { private Socket sock; PongServerRunnable(Socket sock) { this.sock = sock; } @Override public void run() { byte[] buff = new byte[1000]; while(true) { try { sock.getInputStream().read(buff); } catch (IOException e) { e.printStackTrace(); } System.out.println("GOT: " + new String(buff)); try { sock.getOutputStream().write("PONG".getBytes()); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/examples/ProtoBackend.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.examples; import java.io.IOException; import java.nio.ByteBuffer; import java.util.Random; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.atomic.AtomicInteger; import joptsimple.OptionParser; import joptsimple.OptionSet; import org.apache.commons.configuration.Configuration; import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.thrift.TException; import com.google.common.collect.Lists; import edu.berkeley.sparrow.daemon.nodemonitor.NodeMonitorThrift; import edu.berkeley.sparrow.daemon.util.TClients; import edu.berkeley.sparrow.daemon.util.TServers; import edu.berkeley.sparrow.thrift.BackendService; import edu.berkeley.sparrow.thrift.NodeMonitorService.Client; import edu.berkeley.sparrow.thrift.TFullTaskId; import edu.berkeley.sparrow.thrift.TUserGroupInfo; /** * A prototype Sparrow backend. * * This backend is capable of performing a number of benchmark tasks, each representing * distinct resource consumption profiles. It initiates a thrift server with a bounded * size thread pool (of at most {@code WORKER_THREADS} threads). To makes sure that * we never queue tasks, we additionally spawn a new thread each time a task is launched. * In the future, we will have launchTask() directly execute the task and rely on queuing * in the underlying thread pool to queue if task launches exceed capacity. */ public class ProtoBackend implements BackendService.Iface { /** Benchmark which, on each iteration, runs 1 million random floating point * multiplications.*/ public static int BENCHMARK_TYPE_FP_CPU = 1; /** Benchmark which allocates a heap buffer of 200 million bytes, then on each iteration * accesses 1 million contiguous bytes of the buffer, starting at a random offset.*/ public static int BENCHMARK_TYPE_RANDOM_MEMACCESS = 2; // NOTE: we do not use an enum for the above because it is not possible to serialize // an enum with our current simple serialization technique. /** Tracks the total number of tasks launched since execution began. Updated on * each task launch. This is helpful for diagnosing unwanted queuing in various parts * of the system (i.e. if we notice the backend is launching fewer tasks than we expect * based on the frontend task launch rate). */ public static AtomicInteger numTasks = new AtomicInteger(0); public static long startTime = -1; private static final int DEFAULT_LISTEN_PORT = 20101; /** * This indicates how many threads can concurrently be answering function calls * from the NM. Each task is launched in a new thread from one of these threads. If tasks * launches arrive fast enough that all worker threads are concurrently executing * a task, this will queue. We currently launch new threads for each task to prevent * this from happening. */ private static final int THRIFT_WORKER_THREADS = 16; private static final int TASK_WORKER_THREADS = 16; private static final String APP_ID = "testApp"; /** We assume we are speaking to local Node Manager. */ private static final String NM_HOST = "localhost"; private static int NM_PORT; private static Client client; private static final Logger LOG = Logger.getLogger(ProtoBackend.class); private static final ExecutorService executor = Executors.newFixedThreadPool(TASK_WORKER_THREADS); /** * Keeps track of finished tasks. * * A single thread pulls items off of this queue and uses * the client to notify the node monitor that tasks have finished. */ private final BlockingQueue finishedTasks = new LinkedBlockingQueue(); /** * Thread that sends taskFinished() RPCs to the node monitor. * * We do this in a single thread so that we just need a single client to the node monitor * and don't need to create a new client for each task. */ private class TasksFinishedRpcRunnable implements Runnable { @Override public void run() { while (true) { try { TFullTaskId task = finishedTasks.take(); client.tasksFinished(Lists.newArrayList(task)); } catch (InterruptedException e) { LOG.error("Error taking a task from the queue: " + e.getMessage()); } catch (TException e) { LOG.error("Error with tasksFinished() RPC:" + e.getMessage()); } } } } /** * Thread spawned for each task. It runs for a given amount of time (and adds * its resources to the total resources for that time) then stops. It updates * the NodeMonitor when it launches and again when it finishes. */ private class TaskRunnable implements Runnable { private int benchmarkId; private int benchmarkIterations; private TFullTaskId taskId; public TaskRunnable(String requestId, TFullTaskId taskId, ByteBuffer message) { this.benchmarkId = message.getInt(); this.benchmarkIterations = message.getInt(); this.taskId = taskId; } @Override public void run() { if (startTime == -1) { startTime = System.currentTimeMillis(); } long taskStart = System.currentTimeMillis(); int tasks = numTasks.addAndGet(1); double taskRate = ((double) tasks) * 1000 / (System.currentTimeMillis() - startTime); LOG.debug("Aggregate task rate: " + taskRate + " (" + tasks + " launched)"); Random r = new Random(); long benchmarkStart = System.currentTimeMillis(); runBenchmark(benchmarkId, benchmarkIterations, r); LOG.debug("Benchmark runtime: " + (System.currentTimeMillis() - benchmarkStart)); finishedTasks.add(taskId); LOG.debug("Task running for " + (System.currentTimeMillis() - taskStart) + " ms"); } } /** * Run the benchmark identified by {@code benchmarkId} for {@code iterations} * iterations using random generator {@code r}. Return true if benchmark is recognized * and false otherwise. */ public static boolean runBenchmark(int benchmarkId, int iterations, Random r) { if (benchmarkId == BENCHMARK_TYPE_RANDOM_MEMACCESS) { LOG.debug("Running random access benchmark for " + iterations + " iterations."); runRandomMemAcessBenchmark(iterations, r); } else if (benchmarkId == BENCHMARK_TYPE_FP_CPU) { LOG.debug("Running CPU benchmark for " + iterations + " iterations."); runFloatingPointBenchmark(iterations, r); } else { LOG.error("Received unrecognized benchmark type"); return false; } return true; } /** * Benchmark that runs random floating point multiplications for the specified amount of * "iterations", where each iteration is one millisecond. */ public static void runFloatingPointBenchmark(int iterations, Random r) { int runtimeMillis = iterations; long startTime = System.nanoTime(); int opsPerIteration = 1000; /* We keep a running result here and print it out so that the JVM doesn't * optimize all this computation away. */ float result = r.nextFloat(); while ((System.nanoTime() - startTime) / (1000.0 * 1000.0) < runtimeMillis) { for (int j = 0; j < opsPerIteration; j++) { // On each iteration, perform a floating point multiplication float x = r.nextFloat(); float y = r.nextFloat(); result += (x * y); } } LOG.debug("Benchmark result " + result); } /** Benchmark which allocates a heap buffer of 200 million bytes, then on each iteration * accesses 1 million contiguous bytes of the buffer, starting at a random offset.*/ public static void runRandomMemAcessBenchmark(int iterations, Random r) { // 2 hundred million byte buffer int buffSize = 1000 * 1000 * 200; byte[] buff = new byte[buffSize]; // scan 1 million bytes at a time int runLength = 1000 * 1000; // We keep a running result here and print it out so that the JVM doesn't // optimize all this computation away. byte result = 1; for (int i = 0; i < iterations; i++) { // On each iteration, start at a random index, and scan runLength contiguous // bytes, potentially wrapping if we hit the end of the buffer. int start = r.nextInt(buff.length); for (int j = 0; j < runLength; j++) { result = (byte) (result ^ buff[(start + j) % (buff.length - 1)]); } } LOG.debug("Benchmark result " + result); } /** * Initializes the backend by registering with the node monitor. * * Also starts a thread that handles finished tasks (by sending an RPC to the node monitor). */ public void initialize(int listenPort) { // Register server. try { client = TClients.createBlockingNmClient(NM_HOST, NM_PORT); } catch (IOException e) { LOG.debug("Error creating Thrift client: " + e.getMessage()); } try { client.registerBackend(APP_ID, "localhost:" + listenPort); LOG.debug("Client successfully registered"); } catch (TException e) { LOG.debug("Error while registering backend: " + e.getMessage()); } new Thread(new TasksFinishedRpcRunnable()).start(); } @Override public void launchTask(ByteBuffer message, TFullTaskId taskId, TUserGroupInfo user) throws TException { LOG.info("Submitting task " + taskId.getTaskId() + " at " + System.currentTimeMillis()); // Note we ignore user here executor.submit(new TaskRunnable( taskId.requestId, taskId, message)); } public static void main(String[] args) throws IOException, TException { OptionParser parser = new OptionParser(); parser.accepts("c", "configuration file"). withRequiredArg().ofType(String.class); parser.accepts("help", "print help statement"); OptionSet options = parser.parse(args); if (options.has("help")) { parser.printHelpOn(System.out); System.exit(-1); } // Logger configuration: log to the console BasicConfigurator.configure(); LOG.setLevel(Level.DEBUG); LOG.debug("debug logging on"); Configuration conf = new PropertiesConfiguration(); if (options.has("c")) { String configFile = (String) options.valueOf("c"); try { conf = new PropertiesConfiguration(configFile); } catch (ConfigurationException e) {} } // Start backend server ProtoBackend protoBackend = new ProtoBackend(); BackendService.Processor processor = new BackendService.Processor(protoBackend); int listenPort = conf.getInt("listen_port", DEFAULT_LISTEN_PORT); NM_PORT = conf.getInt("node_monitor_port", NodeMonitorThrift.DEFAULT_NM_THRIFT_PORT); TServers.launchThreadedThriftServer(listenPort, THRIFT_WORKER_THREADS, processor); protoBackend.initialize(listenPort); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/examples/ProtoFrontend.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.examples; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Random; import java.util.concurrent.atomic.AtomicInteger; import joptsimple.OptionParser; import joptsimple.OptionSet; import org.apache.commons.configuration.Configuration; import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.thrift.TException; import edu.berkeley.sparrow.api.SparrowFrontendClient; import edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift; import edu.berkeley.sparrow.daemon.util.Serialization; import edu.berkeley.sparrow.thrift.FrontendService; import edu.berkeley.sparrow.thrift.TFullTaskId; import edu.berkeley.sparrow.thrift.TPlacementPreference; import edu.berkeley.sparrow.thrift.TTaskSpec; import edu.berkeley.sparrow.thrift.TUserGroupInfo; /** * Frontend for the prototype implementation. */ public class ProtoFrontend implements FrontendService.Iface { /** Jobs/second during warmup period. */ public static final double DEFAULT_WARMUP_JOB_ARRIVAL_RATE_S = 10; /** Duration of warmup period. */ public static final int DEFAULT_WARMUP_S = 10; /** Amount of time to wait for queues to drain once warmup period is over. */ public static final int DEFAULT_POST_WARMUP_S = 60; /** Amount of time to launch tasks for (not including the warmup period). */ public static final int DEFAULT_EXPERIMENT_S = 300; public static final double DEFAULT_JOB_ARRIVAL_RATE_S = 10; // Jobs/second public static final int DEFAULT_TASKS_PER_JOB = 1; // Tasks/job // Type of benchmark to run, see ProtoBackend static constant for benchmark types public static final int DEFAULT_TASK_BENCHMARK = ProtoBackend.BENCHMARK_TYPE_FP_CPU; public static final int DEFAULT_BENCHMARK_ITERATIONS = 1000; // # of benchmark iterations /** * The default number of preferred nodes for each task (this configuration simulates jobs * that have placement constraints). 0 signals that tasks are unconstrained. */ public static final int DEFAULT_NUM_PREFERRED_NODES = 0; /** * Configuration parameter name for the set of backends (used to set preferred nodes for * tasks). */ public static final String BACKENDS = "backends"; /** * Configuration parameter name for the set of users. Users should be specified by three * values: a user id, an integral priority, and an integral demand, where the demand of each user * is specified relative to the demands of other users. These three values should be semi-colon * separated. */ public static final String USERS = "users"; /** * Default application name. */ public static final String APPLICATION_ID = "testApp"; private static final Logger LOG = Logger.getLogger(ProtoFrontend.class); public final static long startTime = System.currentTimeMillis(); public static AtomicInteger tasksLaunched = new AtomicInteger(0); /** A runnable which Spawns a new thread to launch a scheduling request. */ private class JobLaunchRunnable implements Runnable { private List request; private SparrowFrontendClient client; UserInfo user; public JobLaunchRunnable(List request, UserInfo user, SparrowFrontendClient client) { this.request = request; this.client = client; this.user = user; } @Override public void run() { long start = System.currentTimeMillis(); TUserGroupInfo userInfo = new TUserGroupInfo(user.user, "*", user.priority); try { client.submitJob(APPLICATION_ID, request, userInfo); LOG.debug("Submitted job: " + request + " for user " + userInfo); } catch (TException e) { LOG.error("Scheduling request failed!", e); } long end = System.currentTimeMillis(); LOG.debug("Scheduling request duration " + (end - start)); } } public static class UserInfo { public String user; public int cumulativeWeight; public int priority; /** Used for debugging purposes, to ensure user weights are being used correctly. */ public int totalTasksLaunched; /** Total weight assigned across all users. */ public static int totalWeight = 0; public UserInfo(String user, int weight, int priority) { this.user = user; this.cumulativeWeight = totalWeight + weight; totalWeight = this.cumulativeWeight; this.priority = priority; this.totalTasksLaunched = 0; } } public List generateJob(int numTasks, int numPreferredNodes, List backends, int benchmarkId, int benchmarkIterations) { // Pack task parameters ByteBuffer message = ByteBuffer.allocate(8); message.putInt(benchmarkId); message.putInt(benchmarkIterations); List out = new ArrayList(); for (int taskId = 0; taskId < numTasks; taskId++) { TTaskSpec spec = new TTaskSpec(); spec.setTaskId(Integer.toString((new Random().nextInt()))); spec.setMessage(message.array()); if (numPreferredNodes > 0) { Collections.shuffle(backends); TPlacementPreference preference = new TPlacementPreference(); for (int i = 0; i < numPreferredNodes; i++) { preference.addToNodes(backends.get(i)); } spec.setPreference(preference); } out.add(spec); } return out; } /** * Generates exponentially distributed interarrival delays. */ public double generateInterarrivalDelay(Random r, double lambda) { double u = r.nextDouble(); return -Math.log(u)/lambda; } public void run(String[] args) { try { OptionParser parser = new OptionParser(); parser.accepts("c", "configuration file").withRequiredArg().ofType(String.class); parser.accepts("help", "print help statement"); OptionSet options = parser.parse(args); if (options.has("help")) { parser.printHelpOn(System.out); System.exit(-1); } // Logger configuration: log to the console BasicConfigurator.configure(); LOG.setLevel(Level.DEBUG); Configuration conf = new PropertiesConfiguration(); if (options.has("c")) { String configFile = (String) options.valueOf("c"); conf = new PropertiesConfiguration(configFile); } double warmupLambda = conf.getDouble("warmup_job_arrival_rate_s", DEFAULT_WARMUP_JOB_ARRIVAL_RATE_S); int warmupDurationS = conf.getInt("warmup_s", DEFAULT_WARMUP_S); int postWarmupS = conf.getInt("post_warmup_s", DEFAULT_POST_WARMUP_S); double lambda = conf.getDouble("job_arrival_rate_s", DEFAULT_JOB_ARRIVAL_RATE_S); int experimentDurationS = conf.getInt("experiment_s", DEFAULT_EXPERIMENT_S); LOG.debug("Using arrival rate of " + lambda + " tasks per second and running experiment for " + experimentDurationS + " seconds."); int tasksPerJob = conf.getInt("tasks_per_job", DEFAULT_TASKS_PER_JOB); int numPreferredNodes = conf.getInt("num_preferred_nodes", DEFAULT_NUM_PREFERRED_NODES); LOG.debug("Using " + numPreferredNodes + " preferred nodes for each task."); int benchmarkIterations = conf.getInt("benchmark.iterations", DEFAULT_BENCHMARK_ITERATIONS); int benchmarkId = conf.getInt("benchmark.id", DEFAULT_TASK_BENCHMARK); List backends = new ArrayList(); if (numPreferredNodes > 0) { /* Attempt to parse the list of slaves, which we'll need to (randomly) select preferred * nodes. */ if (!conf.containsKey(BACKENDS)) { LOG.fatal("Missing configuration backend list, which is needed to randomly select " + "preferred nodes (num_preferred_nodes set to " + numPreferredNodes + ")"); } for (String node : conf.getStringArray(BACKENDS)) { backends.add(node); } if (backends.size() < numPreferredNodes) { LOG.fatal("Number of backends smaller than number of preferred nodes!"); } } List users = new ArrayList(); if (conf.containsKey(USERS)) { for (String userSpecification : conf.getStringArray(USERS)) { LOG.debug("Reading user specification: " + userSpecification); String[] parts = userSpecification.split(":"); if (parts.length != 3) { LOG.error("Unexpected user specification string: " + userSpecification + "; ignoring user"); continue; } users.add(new UserInfo(parts[0], Integer.parseInt(parts[1]), Integer.parseInt(parts[2]))); } } if (users.size() == 0) { // Add a dummy user. users.add(new UserInfo("defaultUser", 1, 0)); } SparrowFrontendClient client = new SparrowFrontendClient(); int schedulerPort = conf.getInt("scheduler_port", SchedulerThrift.DEFAULT_SCHEDULER_THRIFT_PORT); client.initialize(new InetSocketAddress("localhost", schedulerPort), APPLICATION_ID, this); if (warmupDurationS > 0) { LOG.debug("Warming up for " + warmupDurationS + " seconds at arrival rate of " + warmupLambda + " jobs per second"); launchTasks(users, warmupLambda, warmupDurationS, tasksPerJob, numPreferredNodes, benchmarkIterations, benchmarkId, backends, client); LOG.debug("Waiting for queues to drain after warmup (waiting " + postWarmupS + " seconds)"); Thread.sleep(postWarmupS * 1000); } LOG.debug("Launching experiment for " + experimentDurationS + " seconds"); launchTasks(users, lambda, experimentDurationS, tasksPerJob, numPreferredNodes, benchmarkIterations, benchmarkId, backends, client); } catch (Exception e) { LOG.error("Fatal exception", e); } } private void launchTasks(List users, double lambda, int launch_duration_s, int tasksPerJob, int numPreferredNodes, int benchmarkIterations, int benchmarkId, List backends, SparrowFrontendClient client) throws InterruptedException { /* This is a little tricky. * * We want to generate inter-arrival delays according to the arrival rate specified. * The simplest option would be to generate an arrival delay and then sleep() for it * before launching each task. However, this is problematic because sleep() might wait * several ms longer than we ask it to. When task arrival rates get really fast, * i.e. one task every 10 ms, sleeping an additional few ms will mean we launch * tasks at a much lower rate than requested. * * Instead, we keep track of task launches in a way that does not depend on how long * sleep() actually takes. We still might have tasks launch slightly after their * scheduled launch time, but we will not systematically "fall behind" due to * compounding time lost during sleep()'s; */ //Random r = new Random(); double mostRecentLaunch = System.currentTimeMillis(); long end = System.currentTimeMillis() + launch_duration_s * 1000; int userIndex = 0; // Used to determine which user's task to run next. while (System.currentTimeMillis() < end) { // Lambda is the arrival rate in S, so we need to multiply the result here by // 1000 to convert to ms. double delay = 1000 / lambda; double curLaunch = mostRecentLaunch + delay; long toWait = Math.max(0, (long) curLaunch - System.currentTimeMillis()); mostRecentLaunch = curLaunch; if (toWait == 0) { LOG.warn("Lanching task after start time in generated workload."); } Thread.sleep(toWait); // Deterministically select which user's task to run, according to weight. UserInfo user = null; for (UserInfo potentialUser : users) { if ((userIndex % UserInfo.totalWeight) < potentialUser.cumulativeWeight) { user = potentialUser; break; } } assert(user != null); ++userIndex; ++user.totalTasksLaunched; LOG.debug("Launching task for user " + user.user + " (" + user.totalTasksLaunched + " total tasks launched for this user)"); Runnable runnable = new JobLaunchRunnable( generateJob(tasksPerJob, numPreferredNodes, backends, benchmarkId, benchmarkIterations), user, client); new Thread(runnable).start(); int launched = tasksLaunched.addAndGet(1); double launchRate = (double) launched * 1000.0 / (System.currentTimeMillis() - startTime); LOG.debug("Aggregate launch rate: " + launchRate); } } @Override public void frontendMessage(TFullTaskId taskId, int status, ByteBuffer message) throws TException { // We don't use messages here, so just log it. LOG.debug("Got unexpected message: " + Serialization.getByteBufferContents(message)); } public static void main(String[] args) { new ProtoFrontend().run(args); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/examples/ProtoFrontendAsync.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.examples; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import java.util.Random; import joptsimple.OptionParser; import joptsimple.OptionSet; import org.apache.commons.configuration.Configuration; import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.thrift.async.AsyncMethodCallback; import org.apache.thrift.async.TAsyncClientManager; import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.protocol.TProtocolFactory; import org.apache.thrift.transport.TNonblockingSocket; import org.apache.thrift.transport.TNonblockingTransport; import edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift; import edu.berkeley.sparrow.thrift.SchedulerService; import edu.berkeley.sparrow.thrift.SchedulerService.AsyncClient.submitJob_call; import edu.berkeley.sparrow.thrift.TSchedulingRequest; import edu.berkeley.sparrow.thrift.TTaskSpec; import edu.berkeley.sparrow.thrift.TUserGroupInfo; /** * Frontend for the prototype implementation. */ public class ProtoFrontendAsync { public static final double DEFAULT_JOB_ARRIVAL_RATE_S = 10; // Jobs/second public static final int DEFAULT_TASKS_PER_JOB = 1; // Tasks/job // Type of benchmark to run, see ProtoBackend static constant for benchmark types public static final int DEFAULT_TASK_BENCHMARK = ProtoBackend.BENCHMARK_TYPE_FP_CPU; public static final int DEFAULT_BENCHMARK_ITERATIONS = 10; // # of benchmark iterations private static final Logger LOG = Logger.getLogger(ProtoFrontendAsync.class); private static class SubmitCallback implements AsyncMethodCallback { TSchedulingRequest req; TNonblockingTransport tr; public SubmitCallback(TSchedulingRequest req, TNonblockingTransport tr) { this.req = req; this.tr = tr; } @Override public void onComplete(submitJob_call response) { LOG.debug("Submitted job: " + req); tr.close(); } @Override public void onError(Exception exception) { LOG.error("Error submitting job"); tr.close(); } } public static List generateJob(int numTasks, int benchmarkId, int benchmarkIterations) { // Pack task parameters ByteBuffer message = ByteBuffer.allocate(8); message.putInt(benchmarkId); message.putInt(benchmarkIterations); List out = new ArrayList(); for (int taskId = 0; taskId < numTasks; taskId++) { TTaskSpec spec = new TTaskSpec(); spec.setTaskId(Integer.toString(taskId)); spec.setMessage(message.array()); out.add(spec); } return out; } public static double generateInterarrivalDelay(Random r, double lambda) { double u = r.nextDouble(); return -Math.log(u)/lambda; } public static void main(String[] args) { try { OptionParser parser = new OptionParser(); parser.accepts("c", "configuration file"). withRequiredArg().ofType(String.class); parser.accepts("help", "print help statement"); OptionSet options = parser.parse(args); if (options.has("help")) { parser.printHelpOn(System.out); System.exit(-1); } // Logger configuration: log to the console BasicConfigurator.configure(); LOG.setLevel(Level.DEBUG); Configuration conf = new PropertiesConfiguration(); if (options.has("c")) { String configFile = (String) options.valueOf("c"); conf = new PropertiesConfiguration(configFile); } Random r = new Random(); double lambda = conf.getDouble("job_arrival_rate_s", DEFAULT_JOB_ARRIVAL_RATE_S); int tasksPerJob = conf.getInt("tasks_per_job", DEFAULT_TASKS_PER_JOB); int benchmarkIterations = conf.getInt("benchmark.iterations", DEFAULT_BENCHMARK_ITERATIONS); int benchmarkId = conf.getInt("benchmark.id", DEFAULT_TASK_BENCHMARK); int schedulerPort = conf.getInt("scheduler_port", SchedulerThrift.DEFAULT_SCHEDULER_THRIFT_PORT); TProtocolFactory factory = new TBinaryProtocol.Factory(); TAsyncClientManager manager = new TAsyncClientManager(); long lastLaunch = System.currentTimeMillis(); // Loop and generate tasks launches while (true) { // Lambda is the arrival rate in S, so we need to multiply the result here by // 1000 to convert to ms. long delay = (long) (generateInterarrivalDelay(r, lambda) * 1000); long curLaunch = lastLaunch + delay; long toWait = Math.max(0, curLaunch - System.currentTimeMillis()); lastLaunch = curLaunch; if (toWait == 0) { LOG.warn("Generated workload not keeping up with real time."); } List tasks = generateJob(tasksPerJob, benchmarkId, benchmarkIterations); TUserGroupInfo user = new TUserGroupInfo(); user.setUser("*"); user.setGroup("*"); TSchedulingRequest req = new TSchedulingRequest(); req.setApp("testApp"); req.setTasks(tasks); req.setUser(user); TNonblockingTransport tr = new TNonblockingSocket( "localhost", schedulerPort); SchedulerService.AsyncClient client = new SchedulerService.AsyncClient( factory, manager, tr); //client.registerFrontend("testApp", new RegisterCallback()); client.submitJob(req, new SubmitCallback(req, tr)); } } catch (Exception e) { LOG.error("Fatal exception", e); } } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/examples/SimpleBackend.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.examples; import java.io.IOException; import java.nio.ByteBuffer; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; import joptsimple.OptionParser; import joptsimple.OptionSet; import org.apache.commons.configuration.Configuration; import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.thrift.TException; import com.google.common.collect.Lists; import edu.berkeley.sparrow.daemon.nodemonitor.NodeMonitorThrift; import edu.berkeley.sparrow.daemon.util.TClients; import edu.berkeley.sparrow.daemon.util.TServers; import edu.berkeley.sparrow.thrift.BackendService; import edu.berkeley.sparrow.thrift.NodeMonitorService.Client; import edu.berkeley.sparrow.thrift.TFullTaskId; import edu.berkeley.sparrow.thrift.TUserGroupInfo; /** * A prototype Sparrow backend that runs sleep tasks. */ public class SimpleBackend implements BackendService.Iface { private static final String LISTEN_PORT = "listen_port"; private static final int DEFAULT_LISTEN_PORT = 20101; /** * Each task is launched in its own thread from a thread pool with WORKER_THREADS threads, * so this should be set equal to the maximum number of tasks that can be running on a worker. */ private static final int WORKER_THREADS = 16; private static final String APP_ID = "sleepApp"; /** Configuration parameters to specify where the node monitor is running. */ private static final String NODE_MONITOR_HOST = "node_monitor_host"; private static final String DEFAULT_NODE_MONITOR_HOST = "localhost"; private static String NODE_MONITOR_PORT = "node_monitor_port"; private static Client client; private static final Logger LOG = Logger.getLogger(SimpleBackend.class); private static final ExecutorService executor = Executors.newFixedThreadPool(WORKER_THREADS); /** * Keeps track of finished tasks. * * A single thread pulls items off of this queue and uses * the client to notify the node monitor that tasks have finished. */ private final BlockingQueue finishedTasks = new LinkedBlockingQueue(); /** * Thread that sends taskFinished() RPCs to the node monitor. * * We do this in a single thread so that we just need a single client to the node monitor * and don't need to create a new client for each task. */ private class TasksFinishedRpcRunnable implements Runnable { @Override public void run() { while (true) { try { TFullTaskId task = finishedTasks.take(); client.tasksFinished(Lists.newArrayList(task)); } catch (InterruptedException e) { LOG.error("Error taking a task from the queue: " + e.getMessage()); } catch (TException e) { LOG.error("Error with tasksFinished() RPC:" + e.getMessage()); } } } } /** * Thread spawned for each task. It runs for a given amount of time (and adds * its resources to the total resources for that time) then stops. It updates * the NodeMonitor when it launches and again when it finishes. */ private class TaskRunnable implements Runnable { private int taskDurationMillis; private TFullTaskId taskId; public TaskRunnable(String requestId, TFullTaskId taskId, ByteBuffer message) { this.taskDurationMillis = message.getInt(); this.taskId = taskId; } @Override public void run() { long startTime = System.currentTimeMillis(); try { Thread.sleep(taskDurationMillis); } catch (InterruptedException e) { LOG.error("Interrupted while sleeping: " + e.getMessage()); } LOG.debug("Task completed in " + (System.currentTimeMillis() - startTime) + "ms"); finishedTasks.add(taskId); } } /** * Initializes the backend by registering with the node monitor. * * Also starts a thread that handles finished tasks (by sending an RPC to the node monitor). */ public void initialize(int listenPort, String nodeMonitorHost, int nodeMonitorPort) { // Register server. try { client = TClients.createBlockingNmClient(nodeMonitorHost, nodeMonitorPort); } catch (IOException e) { LOG.debug("Error creating Thrift client: " + e.getMessage()); } try { client.registerBackend(APP_ID, "localhost:" + listenPort); LOG.debug("Client successfully registered"); } catch (TException e) { LOG.debug("Error while registering backend: " + e.getMessage()); } new Thread(new TasksFinishedRpcRunnable()).start(); } @Override public void launchTask(ByteBuffer message, TFullTaskId taskId, TUserGroupInfo user) throws TException { LOG.info("Submitting task " + taskId.getTaskId() + " at " + System.currentTimeMillis()); executor.submit(new TaskRunnable( taskId.requestId, taskId, message)); } public static void main(String[] args) throws IOException, TException { OptionParser parser = new OptionParser(); parser.accepts("c", "configuration file"). withRequiredArg().ofType(String.class); parser.accepts("help", "print help statement"); OptionSet options = parser.parse(args); if (options.has("help")) { parser.printHelpOn(System.out); System.exit(-1); } // Logger configuration: log to the console BasicConfigurator.configure(); LOG.setLevel(Level.DEBUG); LOG.debug("debug logging on"); Configuration conf = new PropertiesConfiguration(); if (options.has("c")) { String configFile = (String) options.valueOf("c"); try { conf = new PropertiesConfiguration(configFile); } catch (ConfigurationException e) {} } // Start backend server SimpleBackend protoBackend = new SimpleBackend(); BackendService.Processor processor = new BackendService.Processor(protoBackend); int listenPort = conf.getInt(LISTEN_PORT, DEFAULT_LISTEN_PORT); int nodeMonitorPort = conf.getInt(NODE_MONITOR_PORT, NodeMonitorThrift.DEFAULT_NM_THRIFT_PORT); String nodeMonitorHost = conf.getString(NODE_MONITOR_HOST, DEFAULT_NODE_MONITOR_HOST); TServers.launchSingleThreadThriftServer(listenPort, processor); protoBackend.initialize(listenPort, nodeMonitorHost, nodeMonitorPort); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/examples/SimpleFrontend.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.examples; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import joptsimple.OptionParser; import joptsimple.OptionSet; import org.apache.commons.configuration.Configuration; import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.thrift.TException; import edu.berkeley.sparrow.api.SparrowFrontendClient; import edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift; import edu.berkeley.sparrow.daemon.util.Serialization; import edu.berkeley.sparrow.thrift.FrontendService; import edu.berkeley.sparrow.thrift.TFullTaskId; import edu.berkeley.sparrow.thrift.TTaskSpec; import edu.berkeley.sparrow.thrift.TUserGroupInfo; /** * Simple frontend that runs jobs composed of sleep tasks. */ public class SimpleFrontend implements FrontendService.Iface { /** Amount of time to launch tasks for. */ public static final String EXPERIMENT_S = "experiment_s"; public static final int DEFAULT_EXPERIMENT_S = 300; public static final String JOB_ARRIVAL_PERIOD_MILLIS = "job_arrival_period_millis"; public static final int DEFAULT_JOB_ARRIVAL_PERIOD_MILLIS = 100; /** Number of tasks per job. */ public static final String TASKS_PER_JOB = "tasks_per_job"; public static final int DEFAULT_TASKS_PER_JOB = 1; /** Duration of one task, in milliseconds */ public static final String TASK_DURATION_MILLIS = "task_duration_millis"; public static final int DEFAULT_TASK_DURATION_MILLIS = 100; /** Host and port where scheduler is running. */ public static final String SCHEDULER_HOST = "scheduler_host"; public static final String DEFAULT_SCHEDULER_HOST = "localhost"; public static final String SCHEDULER_PORT = "scheduler_port"; /** * Default application name. */ public static final String APPLICATION_ID = "sleepApp"; private static final Logger LOG = Logger.getLogger(SimpleFrontend.class); private static final TUserGroupInfo USER = new TUserGroupInfo(); private SparrowFrontendClient client; /** A runnable which Spawns a new thread to launch a scheduling request. */ private class JobLaunchRunnable implements Runnable { private int tasksPerJob; private int taskDurationMillis; public JobLaunchRunnable(int tasksPerJob, int taskDurationMillis) { this.tasksPerJob = tasksPerJob; this.taskDurationMillis = taskDurationMillis; } @Override public void run() { // Generate tasks in the format expected by Sparrow. First, pack task parameters. ByteBuffer message = ByteBuffer.allocate(4); message.putInt(taskDurationMillis); List tasks = new ArrayList(); for (int taskId = 0; taskId < tasksPerJob; taskId++) { TTaskSpec spec = new TTaskSpec(); spec.setTaskId(Integer.toString(taskId)); spec.setMessage(message.array()); tasks.add(spec); } long start = System.currentTimeMillis(); try { client.submitJob(APPLICATION_ID, tasks, USER); } catch (TException e) { LOG.error("Scheduling request failed!", e); } long end = System.currentTimeMillis(); LOG.debug("Scheduling request duration " + (end - start)); } } public void run(String[] args) { try { OptionParser parser = new OptionParser(); parser.accepts("c", "configuration file").withRequiredArg().ofType(String.class); parser.accepts("help", "print help statement"); OptionSet options = parser.parse(args); if (options.has("help")) { parser.printHelpOn(System.out); System.exit(-1); } // Logger configuration: log to the console BasicConfigurator.configure(); LOG.setLevel(Level.DEBUG); Configuration conf = new PropertiesConfiguration(); if (options.has("c")) { String configFile = (String) options.valueOf("c"); conf = new PropertiesConfiguration(configFile); } int arrivalPeriodMillis = conf.getInt(JOB_ARRIVAL_PERIOD_MILLIS, DEFAULT_JOB_ARRIVAL_PERIOD_MILLIS); int experimentDurationS = conf.getInt(EXPERIMENT_S, DEFAULT_EXPERIMENT_S); LOG.debug("Using arrival period of " + arrivalPeriodMillis + " milliseconds and running experiment for " + experimentDurationS + " seconds."); int tasksPerJob = conf.getInt(TASKS_PER_JOB, DEFAULT_TASKS_PER_JOB); int taskDurationMillis = conf.getInt(TASK_DURATION_MILLIS, DEFAULT_TASK_DURATION_MILLIS); int schedulerPort = conf.getInt(SCHEDULER_PORT, SchedulerThrift.DEFAULT_SCHEDULER_THRIFT_PORT); String schedulerHost = conf.getString(SCHEDULER_HOST, DEFAULT_SCHEDULER_HOST); client = new SparrowFrontendClient(); client.initialize(new InetSocketAddress(schedulerHost, schedulerPort), APPLICATION_ID, this); JobLaunchRunnable runnable = new JobLaunchRunnable(tasksPerJob, taskDurationMillis); ScheduledThreadPoolExecutor taskLauncher = new ScheduledThreadPoolExecutor(1); taskLauncher.scheduleAtFixedRate(runnable, 0, arrivalPeriodMillis, TimeUnit.MILLISECONDS); long startTime = System.currentTimeMillis(); LOG.debug("sleeping"); while (System.currentTimeMillis() < startTime + experimentDurationS * 1000) { Thread.sleep(100); } taskLauncher.shutdown(); } catch (Exception e) { LOG.error("Fatal exception", e); } } @Override public void frontendMessage(TFullTaskId taskId, int status, ByteBuffer message) throws TException { // We don't use messages here, so just log it. LOG.debug("Got unexpected message: " + Serialization.getByteBufferContents(message)); } public static void main(String[] args) { new SimpleFrontend().run(args); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/examples/ThriftPongClient.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.examples; import java.net.InetSocketAddress; import org.apache.thrift.TException; import org.apache.thrift.async.AsyncMethodCallback; import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.protocol.TProtocol; import org.apache.thrift.transport.TFramedTransport; import org.apache.thrift.transport.TSocket; import org.apache.thrift.transport.TTransport; import edu.berkeley.sparrow.daemon.util.ThriftClientPool; import edu.berkeley.sparrow.thrift.PongService; import edu.berkeley.sparrow.thrift.PongService.AsyncClient; import edu.berkeley.sparrow.thrift.PongService.AsyncClient.ping_call; public class ThriftPongClient { private static ThriftClientPool pongClientPool = new ThriftClientPool( new ThriftClientPool.PongServiceMakerFactory()); private static boolean USE_SYNCHRONOUS_CLIENT = true; private static class Callback implements AsyncMethodCallback { private InetSocketAddress address; private Long t0; Callback(InetSocketAddress address, Long t0) { this.address = address; this.t0 = t0; } @Override public void onComplete(ping_call response) { try { pongClientPool.returnClient(address, (AsyncClient) response.getClient()); System.out.println("Took: " + (System.nanoTime() - t0) / (1000.0 * 1000.0) + "ms"); } catch (Exception e) { e.printStackTrace(); } } @Override public void onError(Exception exception) { exception.printStackTrace(); } } private static void pongUsingSynchronousClient(String hostname) throws TException, InterruptedException { TTransport tr = new TFramedTransport(new TSocket(hostname, 12345)); tr.open(); TProtocol proto = new TBinaryProtocol(tr); PongService.Client client = new PongService.Client(proto); while (true) { Long t = System.nanoTime(); client.ping("PING"); System.out.println("Took: " + (System.nanoTime() - t) / (1000.0 * 1000.0) + "ms"); Thread.sleep(500); } } private static void pongUsingAsynchronousClient(String hostname) throws Exception { InetSocketAddress address = new InetSocketAddress(hostname, 12345); while (true) { Long t = System.nanoTime(); AsyncClient client = pongClientPool.borrowClient(address); System.out.println("Getting client took " + ((System.nanoTime() - t) / (1000 * 1000)) + "ms"); client.ping("PING", new Callback(address, System.nanoTime())); Thread.sleep(30); } } public static void main(String[] args) throws Exception { String hostname = args[0]; if (USE_SYNCHRONOUS_CLIENT) { pongUsingSynchronousClient(hostname); } else { pongUsingAsynchronousClient(hostname); } } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/examples/ThriftPongServer.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.examples; import java.io.IOException; import org.apache.thrift.TException; import edu.berkeley.sparrow.daemon.util.TServers; import edu.berkeley.sparrow.thrift.PongService; public class ThriftPongServer implements PongService.Iface { @Override public String ping(String data) throws TException { System.out.println("Got ping: " + data); return "PONG"; } public static void main(String[] args) throws IOException { PongService.Processor pongProcessor = new PongService.Processor(new ThriftPongServer()); TServers.launchSingleThreadThriftServer(12345, pongProcessor); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/examples/ThroughputTestingFrontend.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.examples; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import joptsimple.OptionParser; import joptsimple.OptionSet; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.thrift.TException; import edu.berkeley.sparrow.api.SparrowFrontendClient; import edu.berkeley.sparrow.daemon.scheduler.SchedulerThrift; import edu.berkeley.sparrow.daemon.util.Serialization; import edu.berkeley.sparrow.thrift.FrontendService; import edu.berkeley.sparrow.thrift.TFullTaskId; import edu.berkeley.sparrow.thrift.TTaskSpec; import edu.berkeley.sparrow.thrift.TUserGroupInfo; /** * Frontend that submits large jobs, for the purpose of testing throughput. */ public class ThroughputTestingFrontend implements FrontendService.Iface { // Type of benchmark to run, see ProtoBackend static constant for benchmark types public static final int DEFAULT_TASK_BENCHMARK = ProtoBackend.BENCHMARK_TYPE_FP_CPU; /** * Default application name. */ public static final String APPLICATION_ID = "testApp"; private static final Logger LOG = Logger.getLogger(ThroughputTestingFrontend.class); public final static long startTime = System.currentTimeMillis(); public static AtomicInteger tasksLaunched = new AtomicInteger(0); public void run(String[] args) { try { OptionParser parser = new OptionParser(); parser.accepts("c", "configuration file").withRequiredArg().ofType(String.class); parser.accepts("help", "print help statement"); OptionSet options = parser.parse(args); if (options.has("help")) { parser.printHelpOn(System.out); System.exit(-1); } // Logger configuration: log to the console BasicConfigurator.configure(); LOG.setLevel(Level.DEBUG); SparrowFrontendClient client = new SparrowFrontendClient(); int schedulerPort = SchedulerThrift.DEFAULT_SCHEDULER_THRIFT_PORT; client.initialize(new InetSocketAddress("localhost", schedulerPort), APPLICATION_ID, this); // Generate list of tasks. ByteBuffer message = ByteBuffer.allocate(8); message.putInt(DEFAULT_TASK_BENCHMARK); // Just one iteration! message.putInt(1); List tasks = new ArrayList(); int numTasks = Integer.parseInt(args[0]); LOG.info("Launching " + numTasks + " tasks"); for (int taskId = 0; taskId < numTasks; taskId++) { TTaskSpec spec = new TTaskSpec(); spec.setTaskId(Integer.toString(taskId)); spec.setMessage(message.array()); tasks.add(spec); } TUserGroupInfo userInfo = new TUserGroupInfo("User", "*", 0); while(true) { client.submitJob(APPLICATION_ID, tasks, userInfo); tasksLaunched.addAndGet(tasks.size()); LOG.info(tasksLaunched.get() + " tasks launched"); Thread.sleep(1000); } } catch (Exception e) { LOG.error("Fatal exception", e); } } @Override public void frontendMessage(TFullTaskId taskId, int status, ByteBuffer message) throws TException { // We don't use messages here, so just log it. LOG.debug("Got unexpected message: " + Serialization.getByteBufferContents(message)); } public static void main(String[] args) { new ThroughputTestingFrontend().run(args); } } ================================================ FILE: src/main/java/edu/berkeley/sparrow/examples/readme.markdown ================================================ This folder contains simple frontends and backends to use in testing Sparrow's performance. For 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. ================================================ FILE: src/main/python/README ================================================ Shell scripts in this file aid with setting up the correct path to run Python programs. To run X.py, run ./X.sh. ================================================ FILE: src/main/python/get_response_time.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Quick-and-dirty script to get the response time distribution and plot it import sys import os import subprocess def main(argv): log_dir = argv[1] min_n = argv[2] max_n = argv[3] unqualified_log_files = os.listdir(log_dir) log_files = [os.path.join(log_dir, filename) for \ filename in unqualified_log_files] log_files = filter(lambda x: "tpch" in x, log_files) out_files = [] for fname in log_files: f = open(fname) ip = fname.split("/")[-1:][0].split("_")[2].replace(".log", "") lines = filter(lambda k: "trial" in k, f.readlines()) lines = lines[int(min_n):int(max_n)] times = map(lambda x: int(x.strip().split("\t")[1]), lines) out_file = ip + ".plot_input" out = open(out_file, 'w') for (i, time) in enumerate(sorted(times)): out.write("%s\t%s\n" % (float(i)/len(times), time)) out.close() out_files.append((out_file, ip)) plot_fname = "tpc_resp_cdf.plt" f = open(plot_fname, 'w') plot_file = open(plot_fname, 'w') plot_file.write("set terminal postscript color\n") plot_file.write("set output 'tpc_resp_cdf.ps'\n") parts = map(lambda x: "'%s' using 2:1 with lines lw 3 title '%s'" % (x[0], x[1]), out_files) plot = "plot " + ",\\\n".join(parts) plot_file.write(plot + "\n") plot_file.close() subprocess.check_call("gnuplot %s" % plot_fname, shell=True) # subprocess.check_call("rm *.plot_input", shell=True) if __name__ == "__main__": main(sys.argv) ================================================ FILE: src/main/python/get_utilization.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Quick-and-dirty script to get the cluster utilization over time import sys import os import subprocess def main(argv): log_dir = argv[1] util_min_s = float(argv[2]) util_max_s = float(argv[3]) unqualified_log_files = filter(lambda x: "sparrow_audit" in x, os.listdir(log_dir)) log_files = [os.path.join(log_dir, filename) for \ filename in unqualified_log_files] events = [] events_per_node = {} RUNNING = "nodemonitor_task_runnable" #RUNNING="node_monitor_task_launch" START_INT = 1 COMPLETED = "nodemonitor_task_completed" #COMPLETED = "task_completed" END_INT = -1 task_to_node = {} for filename in log_files: print filename for line in open(filename): items = line.strip().split("\t") if len(items) < 2: continue time = int(items[1]) if RUNNING in items[2]: events.append((time, START_INT)) if COMPLETED in items[2]: events.append((time, END_INT)) events = sorted(events, key = lambda x: x[0]) out_file = open("utilization_vs_time.txt", 'w') count = 0 init_time = events[0][0] total_utilization = 0.0 total_time = (util_max_s - util_min_s) * 1000 last_time = -1 total_starts = 0 for event in events: time_s = (float(event[0]) - init_time) / 1000 if time_s >= util_min_s and time_s <= util_max_s: if event[1] == 1: total_starts = total_starts + 1 if last_time is -1: last_time = event[0] time_diff = event[0] - last_time last_time = event[0] total_utilization = total_utilization + (time_diff * count) count = count + event[1] out_file.write("%s\t%s\n" % (time_s, count)) out_file.close() graph_file = open("utilization_vs_time.gp", 'w') graph_file.write("set terminal postscript\n") graph_file.write("set output 'utilization_vs_time.ps'\n") graph_file.write("set ylabel 'Utilization'\n") graph_file.write("set xlabel 'Time (s)'\n") graph_file.write("plot 'utilization_vs_time.txt' using 1:2 with lines lw 3 lc 1 notitle") print "Average utilization: %s" % (total_utilization / total_time) print "Tasks per second: %s" % (total_starts / (total_time / 1000)) print "Init time: %s" % init_time #subprocess.check_call("rm utilization_vs*.txt", shell=True) if __name__ == "__main__": main(sys.argv) ================================================ FILE: src/main/python/parse_logs.py ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # """ Parses a log file and outputs aggregated information about the experiment. All times are in milliseconds unless otherwise indicated. """ import functools import logging import math import os import re import subprocess import stats import sys import time INVALID_TIME = 0 INVALID_TIME_DELTA = -sys.maxint - 1 INVALID_QUEUE_LENGTH = -1 INVALID_ID = -1 START_SEC = 30 END_SEC = 300 REQUEST_COUNT_GRANUL = 30 """ from http://code.activestate.com/ recipes/511478-finding-the-percentile-of-the-values/ """ def get_percentile(N, percent, key=lambda x:x): """ Find the percentile of a list of values. Args: percent: a float value from 0.0 to 1.0. key: optional key function to compute value from each element of N. Returns: The percentile of the values """ if not N: return 0 k = (len(N)-1) * percent f = math.floor(k) c = math.ceil(k) if f == c: return key(N[int(k)]) d0 = key(N[int(f)]) * (c-k) d1 = key(N[int(c)]) * (k-f) return d0+d1 class Task: """ Class to store information about a task. We store a variety of events corresponding to each task launch, as described in __init__ """ def __init__(self, id): self.__logger = logging.getLogger("Task") # The number of tasks that the node monitor attempted to launch right after this one. self.subsequent_launches = 0 # Whether a task was launched from the queue right after this one completed. self.subsequent_task_launched = False # IP address of the node monitor where this task was launched. self.node_monitor_address = "" # When the node monitor asked for the task from the scheduler. self.node_monitor_get_task_time = INVALID_TIME # When the scheduler (resident with the frontend) assigned the task to the slave. self.scheduler_launch_time = INVALID_TIME # When the node monitor (resident with the backend) launched the task self.node_monitor_launch_time = INVALID_TIME # When the backend completed the task self.completion_time = INVALID_TIME # Address of the machine that the task ran on. self.id = id # The task (and associated request) that ran immediately before this task on the worker # machine. May be null if this task was launched straight from the queue, and not because # an existing task finished. self.previous_request_id = "" self.previous_task_id = "" def __str__(self): return ("Task %s: Scheduler launch %s, NM launch %s, NM complete %s, predicted sched. complete: %f, service time: %s" % (self.id, self.scheduler_launch_time, self.node_monitor_launch_time, self.completion_time, self.adjusted_completion_time(), self.service_time())) def set_scheduler_launch_time(self, time): if self.scheduler_launch_time != INVALID_TIME: self.__logger.warn(("Task %s launched at scheduler twice; expect " "task to only launch once") % self.id) self.scheduler_launch_time = time def set_node_monitor_launch_time(self, time): if self.node_monitor_launch_time != INVALID_TIME: self.__logger.warn(("Task %s launched twice; expect task to " "only launch once") % id) self.node_monitor_launch_time = time def set_completion_time(self, time): if self.completion_time != INVALID_TIME: self.__logger.warn(("Task %s completed twice; " "expect task to only complete once") % self.id) self.completion_time = time def set_previous_task(self, previous_request_id, previous_task_id): if self.previous_request_id != "" or self.previous_task_id != "": self.__logger.warn("Task %s had multiple previous tasks; expected just one" % id) self.previous_request_id = previous_request_id self.previous_task_id = previous_task_id def service_time(self): """ Returns the service time (time executing on backend).""" #print self.node_monitor_address, self.completion_time - self.node_monitor_launch_time return (self.completion_time - self.node_monitor_launch_time) def adjusted_completion_time(self): """ Returns the adjusted completion time (adjusted to be consistent with the scheduler clock). """ expected_scheduler_get_task_time = (self.node_monitor_get_task_time + self.node_monitor_launch_time) / 2.0 skew = self.scheduler_launch_time - expected_scheduler_get_task_time return self.completion_time + skew def complete(self, verbose=False): """ Returns whether we have complete information on this task. """ #if self.scheduler_launch_time == INVALID_TIME: print "scheduler launch" #if self.node_monitor_launch_time == INVALID_TIME: print "nm launch" #if self.completion_time == INVALID_TIME: print "completion" if verbose: if self.node_monitor_get_task_time == INVALID_TIME: print "Task %s incomplete: node monitor get_task time missing" % self.id elif self.scheduler_launch_time == INVALID_TIME: print "Task %s incomplete: Scheduler launch time missing" % self.id elif self.node_monitor_launch_time == INVALID_TIME: print "Task %s incomplete: Node monitor launch time missing" % self.id elif self.completion_time == INVALID_TIME: print "Task %s incomplete: Completion time missing" % self.id return (self.node_monitor_get_task_time != INVALID_TIME and self.scheduler_launch_time != INVALID_TIME and self.node_monitor_launch_time != INVALID_TIME and self.completion_time != INVALID_TIME) TPCH_QUERY_ID_REGEX = re.compile('--(\d+) (\d+)--') class Request: def __init__(self, id): self.__id = id self.__num_tasks = 0 self.__arrival_time = INVALID_TIME self.__tasks = {} self.constrained = False # Address of the scheduler that received the request (and placed it). self.__scheduler_address = "" self.__logger = logging.getLogger("Request") # Mapping of node monitor addresses to when a getTask() was received at the scheduler from # that node monitor (includes reservations that weren't responded to). self.__scheduler_get_task_times = {} # Mapping of node monitor address to a pair of times, the first of which is the time when # the request to get a task was launched, and the second of which is the # time when the request completed. # This is not currently used (it includes times for failed getTask() RPCs, unlike the metric # currently output; it's just here for future reference. self.__get_task_times = {} # Mapping of node monitor address to a pair of times, the first of which is the time when # the request to enqueue a task reservation was launched, and the second of which is the # time when the request completed. self.__enqueue_reservation_rtts = {} self.__user = "" # TPCH query number. self.tpch_id = INVALID_ID # Unique query identifier assigned by shark (used to differentiate # different executions of the same TPC-H query). self.shark_id = INVALID_ID # Spark stage ID self.stage_id = INVALID_ID self.constrained = False def __str__(self): 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)) for task in self.__tasks.values(): ret += str(task) ret += " " return ret def user(self): return self.__user def add_subsequent_task_launch_failure(self, task_id): task = self.__get_task(task_id) task.subsequent_launches += 1 def add_subsequent_task_launch(self, task_id): task = self.__get_task(task_id) task.subsequent_launches += 1 assert not task.subsequent_task_launched task.subsequent_task_launched = True def get_subsequent_task_launches(self): subsequent_tasks_launched = [] for task in self.__tasks.values(): if task.subsequent_task_launched: subsequent_tasks_launched.append(task.subsequent_launches) # TODO: otherwise, add 0. return subsequent_tasks_launched def add_arrival(self, time, num_tasks, address, user, description, constrained): self.__arrival_time = time self.__num_tasks = int(num_tasks) self.__scheduler_address = address self.__user = user if constrained == "true": self.constrained = True description_parts = description.split("-") if len(description_parts) < 2: pass #print "Description not formatted as Spark/Shark description: " + description else: self.stage_id = description_parts[-1] match = TPCH_QUERY_ID_REGEX.search(description) if match == None: is_warmup_query = (description.find("SPREAD_EVENLY") != -1) is_create_table_query = (description.find("create table denorm") != -1) if not (is_warmup_query or is_create_table_query): self.__logger.warn("Couldn't find TPCH query id in description: %s" % description) return # An identifier that's unique for the Shark driver, but not across all drivers. self.shark_id = match.group(1) self.tpch_id = match.group(2) #print ("Shark ID: %s, stage id: %s, TPCH id: %s for description %s" % # (self.shark_id, self.stage_id, self.tpch_id, description)) def add_enqueue_reservation_launch(self, time, address): if address not in self.__enqueue_reservation_rtts: self.__enqueue_reservation_rtts[address] = [INVALID_TIME, INVALID_TIME] self.__enqueue_reservation_rtts[address][0] = time def add_enqueue_reservation_completion(self, time, address): ip_only = address if address.find("/") != -1: ip_only = address.split("/")[1] if ip_only not in self.__enqueue_reservation_rtts: self.__enqueue_reservation_rtts[ip_only] = [INVALID_TIME, INVALID_TIME] self.__enqueue_reservation_rtts[ip_only][1] = time def add_node_monitor_get_task_launch(self, time, address): if address not in self.__get_task_times: self.__get_task_times[address] = [INVALID_TIME, INVALID_TIME] self.__get_task_times[address][0] = time def add_node_monitor_get_task_completion(self, time, address): if address not in self.__get_task_times: self.__get_task_times[address] = [INVALID_TIME, INVALID_TIME] self.__get_task_times[address][1] = time def set_node_monitor_get_task_times_for_tasks(self): for task in self.__tasks.values(): if task.node_monitor_address != "": task.node_monitor_get_task_time = self.__get_task_times[ task.node_monitor_address][0] def get_enqueue_reservation_rtts(self): rtts = [] for rtt_info in self.__enqueue_reservation_rtts.values(): if rtt_info[0] != INVALID_TIME and rtt_info[1] != INVALID_TIME: rtts.append(rtt_info[1] - rtt_info[0]) return rtts def get_get_task_rtts(self): """ This only includes the RTTS for tasks that were actually launched! """ rtts = [] for task in self.__tasks.values(): if (task.node_monitor_get_task_time != INVALID_TIME and task.node_monitor_launch_time != INVALID_TIME): rtts.append(task.node_monitor_launch_time - task.node_monitor_get_task_time) return rtts def add_scheduler_get_task(self, time, node_monitor_address): """ Adds the time when getTask() was called (as perceived by the scheduler). """ self.__scheduler_get_task_times[node_monitor_address] = time def get_scheduler_get_task_times(self): return (self.__arrival_time, self.__scheduler_get_task_times.values()) def add_scheduler_task_launch(self, task_id, launch_time): task = self.__get_task(task_id) task.set_scheduler_launch_time(launch_time) def add_node_monitor_task_launch(self, node_monitor_address, task_id, previous_request_id, previous_task_id, launch_time): task = self.__get_task(task_id) task.node_monitor_address = node_monitor_address task.set_node_monitor_launch_time(launch_time) task.set_previous_task(previous_request_id, previous_task_id) def add_task_completion(self, task_id, completion_time): # We might see a task completion before a task launch, depending on the # order that we read log files in. task = self.__get_task(task_id) task.set_completion_time(completion_time) def get_task_completion(self, task_id): if task_id in self.__tasks: return self.__tasks[task_id].completion_time else: return INVALID_TIME def arrival_time(self): """ Returns the time at which the job arrived at the scheduler. """ return self.__arrival_time def scheduler_address(self): return self.__scheduler_address def network_delays(self): """ Returns a list of delays for all __tasks with delay information. """ network_delays = [] for task in self.__tasks.values(): if task.complete(): network_delays.append(task.network_delay()) if task.network_delay() > 20: print "Long launch %s" % self.__id print task.node_monitor_submit_time print task.scheduler_launch_time print task.id print task.address print return network_delays def start_and_end_times(self): """ Returns a list of (launch time, finish time) tupes for complete __tasks. Ignores clock skew. """ return [(x.node_monitor_launch_time, x.completion_time) for x in self.__tasks.values() if x.complete()] def start_and_service_times(self): """ Returns a list of (start time, service time) tuples for complete __tasks. """ return [(x.scheduler_launch_time, x.service_time()) for x in self.__tasks.values() if x.complete()] def service_times(self): """ Returns a list of service times for complete __tasks. """ service_times = [task.service_time() for task in self.__tasks.values() if task.complete(True)] return service_times def queue_times(self): """ Returns a list of queue times for all complete __tasks. """ return [task.scheduler_launch_time - self.__arrival_time for task in self.__tasks.values() if task.complete()] def get_previous_tasks(self): """ Returns a list of tuples: (task_launch_time, previous_request_id, previous_task_id). """ previous_task_info = [] for task in self.__tasks.values(): if task.complete() and task.previous_request_id: previous_task_info.append((task.node_monitor_launch_time, task.previous_request_id, task.previous_task_id)) return previous_task_info def get_service_times(self, per_node_service_times): """ Adds the service time for each node to the mapping of service times. """ for task in self.__tasks.values(): if task.node_monitor_address not in per_node_service_times: per_node_service_times[task.node_monitor_address] = [] per_node_service_times[task.node_monitor_address].append(task.service_time()) def get_per_node_queued_times(self, per_node_queued_times): """ Adds the queued time for each node to the mapping of service times. """ for task in self.__tasks.values(): if task.node_monitor_address not in per_node_queued_times: per_node_queued_times[task.node_monitor_address] = [] per_node_queued_times[task.node_monitor_address].append(task.adjusted_completion_time() - self.__arrival_time) def optimal_response_time(self): return max([t.service_time() for t in self.__tasks.values()]) def response_time(self): """ Returns the time from when the job arrived to when it completed. Returns INVALID_TIME_DELTA if we don't have completion information on the job. Note that we may have information about when the job completed, but not complete information about the job (e.g. we don't know when one of the tasks was launched). """ if self.__arrival_time == INVALID_TIME: self.__logger.debug("Request %s missing arrival time" % self.__id) return INVALID_TIME_DELTA completion_time = self.__arrival_time for task_id, task in self.__tasks.items(): if task.completion_time == INVALID_TIME: self.__logger.debug(("Task %s in request %s missing completion " "time") % (task_id, self.__id)) return INVALID_TIME_DELTA task_completion_time = task.adjusted_completion_time() #if task.scheduler_launch_time > task.node_monitor_launch_time: #self.__logger.warn(("Task %s suggests clock skew: scheduler launch time %d, node " # "monitor launch time %d") % #(task_id, task.scheduler_launch_time, # task.node_monitor_launch_time)) completion_time = max(completion_time, task_completion_time) return completion_time - self.__arrival_time def complete_tasks(self): complete_tasks = 0 for task in self.__tasks.values(): if task.complete(): complete_tasks += 1 return complete_tasks def complete(self, verbose=False): """ Returns whether we have complete info for the request. Due to incomplete log files, it's possible that we'll have completion information but not start information for a job. """ if (self.__num_tasks == 0 or self.__arrival_time == 0 or self.__num_tasks != len(self.__tasks)): # if verbose: print ("Request %s incomplete. %d expected tasks, %d recorded tasks, " "arrival time %s") % (self.__id, self.__num_tasks, len(self.__tasks), self.__arrival_time) return False for task in self.__tasks.values(): if not task.complete(verbose): return False return True def __get_task(self, task_id): """ Gets the task from the map of __tasks. Creates a new task if the task with the given ID doesn't already exist. """ if task_id not in self.__tasks: self.__tasks[task_id] = Task(task_id) return self.__tasks[task_id] def __get_probe(self, address): """ Gets the probe from the map of __probes. Creates a new probe if the probe with the given address doesn't already exist. """ if address not in self.__probes: self.__probes[address] = Probe(self.__id, address) return self.__probes[address] class LogParser: """ Helps extract job information from log files. Attributes: requests: A map of strings specifying request IDs to jobs. """ CLASS_INDEX = 0 TIME_INDEX = 1 AUDIT_EVENT_INDEX = 2 def __init__(self): self.__requests = {} self.__logger = logging.getLogger("LogParser") self.__earliest_time = (time.time() * 1000)**2 # Mapping of node monitor IP addresses to a list of (queue length, time) pairs observed at # that IP address. self.__node_monitor_queue_lengths = {} self.__users = set() def earliest_time(self): return self.__earliest_time def get_requests(self): return self.__requests def parse_file(self, filename): print "parsing %s" % filename file = open(filename, "r") for line in file: # Strip off the newline at the end of the line. items = line[:-1].split("\t") # Time is expressed in epoch milliseconds. time = int(items[self.TIME_INDEX]) self.__earliest_time = min(self.__earliest_time, time) audit_event_params = " ".join(items[self.AUDIT_EVENT_INDEX:]).split(":") if audit_event_params[0] == "arrived": request = self.__get_request(audit_event_params[1]) # TODO: replace last param with "constrained", once that's added request.add_arrival(time, audit_event_params[2], audit_event_params[3], audit_event_params[5], audit_event_params[6], audit_event_params[7]) if audit_event_params[5]: self.__users.add(audit_event_params[5]) elif audit_event_params[0] == "scheduler_launch_enqueue_task": request = self.__get_request(audit_event_params[1]) request.add_enqueue_reservation_launch(time, audit_event_params[2]) elif audit_event_params[0] == "scheduler_complete_enqueue_task": request = self.__get_request(audit_event_params[1]) request.add_enqueue_reservation_completion(time, audit_event_params[2]) elif audit_event_params[0] == "node_monitor_enqueue_task_reservation": # TODO: actually implement this! is this useful? request = self.__get_request(audit_event_params[1]) #request.add_node_monitor_enqueue_reservation(time, audit_event_params[2]) elif audit_event_params[0] == "reservation_enqueued": self.__reservation_enqueued(time, audit_event_params[1], audit_event_params[3]) elif audit_event_params[0] == "scheduler_assigned_task": request = self.__get_request(audit_event_params[1]) request.add_scheduler_task_launch(audit_event_params[2], time) request.add_scheduler_get_task(time, audit_event_params[3]) elif audit_event_params[0] == "scheduler_get_task_no_task": request = self.__get_request(audit_event_params[1]) request.add_scheduler_get_task(time, audit_event_params[2]) elif audit_event_params[0] == "node_monitor_task_launch": request = self.__get_request(audit_event_params[1]) request.add_node_monitor_task_launch(audit_event_params[2], audit_event_params[3], audit_event_params[4], audit_event_params[5], time) if audit_event_params[4]: previous_request = self.__get_request(audit_event_params[4]) previous_request.add_subsequent_task_launch(audit_event_params[5]) elif audit_event_params[0] == "task_completed": request = self.__get_request(audit_event_params[1]) request.add_task_completion(audit_event_params[2], time) elif audit_event_params[0] == "node_monitor_get_task_launch": request = self.__get_request(audit_event_params[1]) request.add_node_monitor_get_task_launch(time, audit_event_params[2]) elif audit_event_params[0] == "node_monitor_get_task_complete": request = self.__get_request(audit_event_params[1]) request.add_node_monitor_get_task_completion(time, audit_event_params[2]) elif audit_event_params[0] == "node_monitor_get_task_no_task": previous_request = self.__get_request(audit_event_params[2]) previous_request.add_subsequent_task_launch_failure(audit_event_params[3]) else: if audit_event_params[0] != "node_monitor_cancellation": self.__logger.warn("Received unknown audit event: " + audit_event_params[0]) for request in self.__requests.values(): request.set_node_monitor_get_task_times_for_tasks() def output_reservation_queue_lengths(self, output_directory): """ Outputs the reservation queue length as a function of time, at each node monitor. """ gnuplot_file = open("%s/reservation_queue_lengths.gp" % output_directory, "w") gnuplot_file.write("set terminal postscript color 'Helvetica' 12\n") gnuplot_file.write("set output 'reservation_queue_length.ps'\n") gnuplot_file.write("set xlabel 'Time (ms)'\n") gnuplot_file.write("set ylabel 'Queue Length'\n") gnuplot_file.write("plot ") is_first = True for (node_monitor_address, queue_lengths) in self.__node_monitor_queue_lengths.items(): results_filename = "%s/%s_queue_lengths" % (output_directory, node_monitor_address) file = open(results_filename, "w") file.write("time\tQueue Length\n") for time, queue_length in queue_lengths: file.write("%s\t%s\n" % (time - self.__earliest_time, queue_length)) file.close() if not is_first: gnuplot_file.write(",\\\n") is_first = False gnuplot_file.write("'%s_queue_lengths' using 1:2 lw 1 with lp" % node_monitor_address) def output_per_node_queued_time(self, output_directory): per_node_queued_times = {} for request in self.__requests.values(): request.get_per_node_queued_times(per_node_queued_times) file = open(os.path.join(output_directory, "per_node_queued_times"), "w") file.write("NMAddress\tQueuedtime(50th/90th/99th)\n") for (node_monitor_address, queued_times) in per_node_queued_times.items(): queued_times.sort() file.write("%s\t%s\t%s\t%s\n" % (node_monitor_address, get_percentile(queued_times, 0.5), get_percentile(queued_times, 0.9), get_percentile(queued_times, 0.99))) file.close() def output_per_node_service_time(self, output_directory): per_node_service_times = {} for request in self.__requests.values(): request.get_service_times(per_node_service_times) file = open(os.path.join(output_directory, "per_node_service_times"), "w") file.write("NMAddress\tServicetime(50th/90th/99th)\n") for (node_monitor_address, service_times) in per_node_service_times.items(): service_times.sort() file.write("%s\t%s\t%s\t%s\n" % (node_monitor_address, get_percentile(service_times, 0.5), get_percentile(service_times, 0.9), get_percentile(service_times, 0.99))) file.close() def output_tasks_launched_versus_time(self, output_directory): """ Creates a gnuplot file to plot tasks launched versus time for 10 requests in the middle of the experiment. """ gnuplot_file = open("%s/task_launches_vs_time.gp" % output_directory, "w") gnuplot_file.write("set terminal postscript color 'Helvetica' 12\n") gnuplot_file.write("set output '%s/task_launches_vs_time.ps'\n" % output_directory) gnuplot_file.write("set xlabel 'Time (ms)'\n") gnuplot_file.write("set ylabel 'Tasks Launched'\n") gnuplot_file.write("plot ") job_count = 0 for id, request in self.__requests.items(): results_filename = "%s/%s_tasks_launched_vs_time" % (output_directory, id) file = open(results_filename, "w") arrival_time, reservation_replies = request.get_scheduler_get_task_times() reservation_count = 0 file.write("0\t0\n") for reservation in reservation_replies: reservation_count += 1 # Write the elapsed time since the request arrived. file.write("%s\t%s\n" % (reservation - arrival_time, reservation_count)) file.close() if job_count != 0: gnuplot_file.write(",\\\n") gnuplot_file.write("'%s' using 1:2 lw 1 with lp" % results_filename) job_count += 1 if job_count >= 20: break gnuplot_file.close() def output_complete_incomplete_requests_vs_time(self, output_directory): complete_requests = filter(lambda request: request.complete(), self.__requests.values()) complete_requests.sort(key=lambda request: request.arrival_time()) complete_requests_filename = "complete_requests.data" complete_file = open(os.path.join(output_directory, complete_requests_filename), "w") complete_file.write("ArrivalTime\tCount\n") for count, request in enumerate(complete_requests): complete_file.write("%s\t%s\n" % (request.arrival_time() - self.__earliest_time, count)) complete_file.close() incomplete_requests = filter(lambda request: not request.complete(), self.__requests.values()) incomplete_requests.sort(key=lambda request: request.arrival_time()) incomplete_requests_filename = "incomplete_requests.data" incomplete_file = open(os.path.join(output_directory, incomplete_requests_filename), "w") incomplete_file.write("ArrivalTime\tCount\n") for count, request in enumerate(incomplete_requests): incomplete_file.write("%s\t%s\n" % (request.arrival_time() - self.__earliest_time, count)) incomplete_file.close() gnuplot_file = open(os.path.join(output_directory, "complete_incomplete.gp"), "w") gnuplot_file.write("set terminal postscript color 'Helvetica' 12\n") gnuplot_file.write("set output 'complete_incomplete.ps'\n") gnuplot_file.write("set xlabel 'Experiment time (ms)'\n") gnuplot_file.write("set ylabel 'Request Count'\n") gnuplot_file.write("set xrange [0:]\n") gnuplot_file.write("set yrange [0:]\n") gnuplot_file.write("plot '%s' using 1:2 lw 4 with l title 'Complete',\\\n" % complete_requests_filename) gnuplot_file.write("'%s' using 1:2 lw 4 with l title 'Incomplete'\n" % incomplete_requests_filename) def output_tasks_completed_vs_arrival(self, output_directory): pairs = [(request.arrival_time() - self.__earliest_time, request.complete_tasks()) for request in self.__requests.values()] pairs.sort(key=lambda x: x[0]) data_filename = "tasks_completed_vs_arrival_time.data" data_file = open(os.path.join(output_directory, data_filename), "w") data_file.write("ArrivalTime\tTasksCompleted\n") for pair in pairs: data_file.write("%s\t%s\n" % (pair[0], pair[1])) data_file.close() gnuplot_file = open(os.path.join(output_directory, "tasks_completed_vs_arrival_time.gp"), "w") gnuplot_file.write("set terminal postscript color 'Helvetica' 12\n") gnuplot_file.write("set output 'tasks_completed_vs_arrival_time.ps'\n") gnuplot_file.write("set xlabel 'Experiment time (ms)'\n") gnuplot_file.write("set ylabel 'Completed Tasks'\n") gnuplot_file.write("set xrange [0:]\n") gnuplot_file.write("set yrange [0:]\n") gnuplot_file.write("plot '%s' using 1:2 lw 4 with p notitle\n" % data_filename) def output_results(self, output_directory): self.output_aggregate_stats(self.__requests, output_directory) constrained_requests = dict((k, v) for (k, v) in self.__requests.items() if v.constrained) self.output_aggregate_stats(constrained_requests, output_directory, "constrained") unconstrained_requests = dict((k, v) for (k, v) in self.__requests.items() if not v.constrained) self.output_aggregate_stats(unconstrained_requests, output_directory, "unconstrained") return for user in self.__users: if user == "warmupUser": continue print "Outputting stats for user " + user user_output_directory = os.path.join(output_directory, user) os.mkdir(user_output_directory) user_requests = dict((request_id,request) for (request_id, request) in self.__requests.items() if request.user() == user) self.output_aggregate_stats(user_requests, user_output_directory) self.output_running_tasks(user_requests, user_output_directory) def output_running_tasks(self, requests, output_directory): """ Outputs the number of running tasks as a function of time, for the given requests. """ TASK_START = 1 TASK_END = -1 events = [] for request in requests.values(): for (start_time, end_time) in request.start_and_end_times(): events.append((start_time, TASK_START)) events.append((end_time, TASK_END)) events.sort(key = lambda x: x[0]) running_tasks_filename = "running_tasks" running_tasks_file = open(os.path.join(output_directory, running_tasks_filename), "w") running_tasks_file.write("Time\tNumTasksRunning\n") task_count = 0 for event in events: running_tasks_file.write("%s\t%s\n" % (event[0], task_count)) task_count += event[1] running_tasks_file.write("%s\t%s\n" % (event[0], task_count)) running_tasks_file.close() gnuplot_file = open(os.path.join(output_directory, "running_tasks.gp"), "w") gnuplot_file.write("set terminal postscript color 'Helvetica' 12\n") gnuplot_file.write("set output 'running_tasks.ps'\n") gnuplot_file.write("set xlabel 'Time (ms)'\n") gnuplot_file.write("set ylabel 'Running Tasks'\n") gnuplot_file.write("set yrange [0:]\n") gnuplot_file.write("plot '%s' using 1:2 lw 4 with lp notitle\n" % running_tasks_filename) def output_aggregate_stats(self, requests, output_directory, name_suffix=""): # Overhead versus best possible response time of a request, given its service times overheads = [] # Response time is the time from when the job arrived at a scheduler # to when it completed. response_times = [] # Network RTT for the enqueue reservation call. enqueue_reservation_rtts = [] # Network RTT for get task call get_task_rtts = [] # Time from when a task completed to when a new task was launched. # TODO: add zeros here for all of the tasks that completed immediately. get_new_task_times = [] service_times = [] # Used to look at the effects of jitting. start_and_service_times = [] # Used to look at how the response time varies over the course of the experiment start_and_response_times = [] queue_times = [] probe_times = [] get_task_task_counts = [] start_time = self.__earliest_time + (START_SEC * 1000) end_time = self.__earliest_time + (END_SEC * 1000) complete_requests = filter(lambda k: k.complete(), requests.values()) print "Complete requests: %d" % len(complete_requests) if len(complete_requests) == 0: print "Incomplete request info:" for request in requests.values(): request.complete(True) return considered_requests = filter(lambda k: k.arrival_time() >= start_time and k.arrival_time() <= end_time and k.complete(), requests.values()) print "Included %s requests" % len(considered_requests) print "Excluded %s requests" % (len(requests.values()) - len(considered_requests)) print "Requests per second:" per_sec_requests = {} for r in requests.values(): seconds_since_start = (r._Request__arrival_time - self.__earliest_time) / 1000 group = seconds_since_start - (seconds_since_start % REQUEST_COUNT_GRANUL) per_sec_requests[group] = per_sec_requests.get(group, 0) + 1 for (group, g_requests) in sorted(per_sec_requests.items()): print "%s\t%s" % (group, g_requests) for request in considered_requests: scheduler_address = request.scheduler_address() enqueue_reservation_rtts.extend(request.get_enqueue_reservation_rtts()) get_task_rtts.extend(request.get_get_task_rtts()) service_times.extend(request.service_times()) start_and_service_times.extend(request.start_and_service_times()) start_and_response_times.append((request.arrival_time(), request.response_time())) queue_times.extend(request.queue_times()) response_time = request.response_time() overheads.append(response_time - request.optimal_response_time()) response_times.append(response_time) get_task_task_counts.extend(request.get_subsequent_task_launches()) previous_task_info = request.get_previous_tasks() for (task_launch_time, previous_request_id, previous_task_id) in previous_task_info: if previous_request_id in requests: previous_task_completion_time = requests[ previous_request_id].get_task_completion(previous_task_id) if previous_task_completion_time != INVALID_TIME: get_new_task_times.append(task_launch_time - previous_task_completion_time) else: # TODO: something smarter here. get_new_task_times.append(0) # Output data for response time and network delay CDFs. results_filename = "results%s.data" % name_suffix file = open(os.path.join(output_directory, results_filename), "w") file.write("%ile\tResponseTime\tNetworkRTT(EnqueueRes.)\tNetworkRTT(getTask)\t" "NetworkRTT(combined)\tGetNewTask\tServiceTime\tQueuedTime\t" "GetTaskTaskCount\tOverhead\n") network_rtts = [] network_rtts.extend(enqueue_reservation_rtts) network_rtts.extend(get_task_rtts) network_rtts.sort() response_times.sort() enqueue_reservation_rtts.sort() get_task_rtts.sort() get_new_task_times.sort() service_times.sort() queue_times.sort() get_task_task_counts.sort() overheads.sort() NUM_DATA_POINTS = 100 for i in range(NUM_DATA_POINTS): i = float(i) / NUM_DATA_POINTS file.write("%f\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n" % (i, get_percentile(response_times, i), get_percentile(enqueue_reservation_rtts, i), get_percentile(get_task_rtts, i), get_percentile(network_rtts, i), get_percentile(get_new_task_times, i), get_percentile(service_times, i), get_percentile(queue_times, i), get_percentile(get_task_task_counts, i), get_percentile(overheads, i))) file.close() # Output summary CDFs. gnuplot_file = open("%s/results.gp" % output_directory, "w") gnuplot_file.write("set terminal postscript color 'Helvetica' 12\n") gnuplot_file.write("set output 'results.ps'\n") gnuplot_file.write("set xlabel 'Milliseconds'\n") gnuplot_file.write("set ylabel 'Cumulative Probability'\n") gnuplot_file.write("set xrange [0:]\n") gnuplot_file.write("set yrange [0:1]\n") gnuplot_file.write("plot '%s' using 2:1 lw 4 with l title 'ResponseTime',\\\n" % results_filename) gnuplot_file.write("'%s' using 4:1 lw 4 with l title 'GetTask RTT',\\\n" % results_filename) gnuplot_file.write("'%s' using 3:1 lw 4 with l title 'Enqueue Reservation RTT',\\\n" % results_filename) gnuplot_file.write("'%s' using 5:1 lw 4 with l title 'Network RTT',\\\n" % results_filename) gnuplot_file.write("'%s' using 6:1 lw 4 with l title 'Get New Task Time',\\\n" % results_filename) gnuplot_file.write("'%s' using 7:1 lw 4 with l title 'Service Time',\\\n" % results_filename) gnuplot_file.write("'%s' using 10:1 lw 4 with l title 'Overhead vs Optimal',\\\n" % results_filename) gnuplot_file.write("'%s' using 8:1 lw 4 with l title 'Queue Time'\n" % results_filename) # Output network RTTs. rtt_gnuplot_file = open("%s/network_rtts.gp" % output_directory, "w") rtt_gnuplot_file.write("set terminal postscript color 'Helvetica' 12\n") rtt_gnuplot_file.write("set output 'network_rtts.ps'\n") rtt_gnuplot_file.write("set xlabel 'Milliseconds'\n") rtt_gnuplot_file.write("set ylabel 'Cumulative Probability'\n") rtt_gnuplot_file.write("set xrange [0:]\n") rtt_gnuplot_file.write("set yrange [0:1]\n") rtt_gnuplot_file.write("plot '%s' using 5:1 lw 4 with l title 'Network RTT (all)',\\\n" % results_filename) rtt_gnuplot_file.write("'%s' using 3:1 lw 4 with l title 'EnqueueReservations() RTT',\\\n" % results_filename) rtt_gnuplot_file.write("'%s' using 4:1 lw 4 with l title 'GetTask() RTT'" % results_filename) rtt_gnuplot_file.close() # Output get task task counts. get_task_gnuplot_file = open("%s/get_task_counts.gp" % output_directory, "w") get_task_gnuplot_file.write("set terminal postscript color 'Helvetica' 12\n") get_task_gnuplot_file.write("set output 'get_task_counts.ps'\n") get_task_gnuplot_file.write("set xlabel 'Task count'\n") get_task_gnuplot_file.write("set ylabel 'Cumulative Probability'\n") get_task_gnuplot_file.write("set xrange [0:]\n") get_task_gnuplot_file.write("set yrange [0:1]\n") get_task_gnuplot_file.write("plot '%s' using 9:1 lw 4 with l title 'Get task task count'" % results_filename) get_task_gnuplot_file.close() # Output task run time as a function of start time. start_and_service_times.sort(key = lambda x: x[0]) start_and_response_times.sort(key = lambda x: x[0]) first_start_time = start_and_service_times[0][0] stride = max(1, len(start_and_service_times) / 500) start_and_service_filename = "start_and_service_time.data" start_and_service_file = open(os.path.join(output_directory, start_and_service_filename), "w") for start_time, service_time in start_and_service_times[::stride]: start_and_service_file.write("%s\t%s\n" % (start_time - first_start_time, service_time)) start_and_service_file.close(); start_and_response_filename = "start_and_response_time.data" start_and_response_file = open(os.path.join(output_directory, start_and_response_filename), "w") for arrival_time, response_time in start_and_response_times: start_and_response_file.write("%s\t%s\n" % (arrival_time - first_start_time, response_time)) start_and_response_file.close() start_and_service_gnuplot_file = open("%s/response_and_service_vs_arrival.gp" % output_directory, "w") start_and_service_gnuplot_file.write("set terminal postscript color\n") start_and_service_gnuplot_file.write("set output 'response_and_service_vs_arrival.ps'\n") start_and_service_gnuplot_file.write("set xlabel 'Time'\n") start_and_service_gnuplot_file.write("set yrange [0:]\n") start_and_service_gnuplot_file.write("set ylabel 'Milliseconds\n") start_and_service_gnuplot_file.write(("plot '%s' using 1:2 with lp lw 4 title 'Task " "Service Time',\\\n") % start_and_service_filename) start_and_service_gnuplot_file.write("'%s' using 1:2 with lp lw 4 title 'Response Time'" % start_and_response_filename) start_and_service_gnuplot_file.close() self.plot_response_time_cdf(results_filename, output_directory) summary_file = open(os.path.join(output_directory, "response_time_summary"), "w") summary_file.write("%s %s %s %s\n" % (get_percentile(response_times, .05), get_percentile(response_times, 0.5), get_percentile(response_times, .95), get_percentile(response_times, .99))) summary_file.close() def plot_response_time_cdf(self, results_filename, output_directory): gnuplot_file = open("%s/response_time_cdf.gp" % output_directory, "w") gnuplot_file.write("set terminal postscript color\n") #gnuplot_file.write("set size 0.5,0.5\n") gnuplot_file.write("set output '%s/response_time_cdf.ps'\n" % output_directory) gnuplot_file.write("set xlabel 'Response Time (ms)'\n") gnuplot_file.write("set ylabel 'Cumulative Probability'\n") gnuplot_file.write("set yrange [0:1]\n") gnuplot_file.write("plot '%s' using 2:1 lw 4 with lp\\\n" % results_filename) gnuplot_file.close() def __reservation_enqueued(self, time, ip_address, num_queued_reservations): if ip_address not in self.__node_monitor_queue_lengths: self.__node_monitor_queue_lengths[ip_address] = [] self.__node_monitor_queue_lengths[ip_address].append((time, num_queued_reservations)) def __get_request(self, request_id): """ Gets the request from the map of requests. Creates a new request if a request with the given ID doesn't already exist. """ if request_id not in self.__requests: self.__requests[request_id] = Request(request_id) return self.__requests[request_id] def main(argv): PARAMS = ["log_dir", "output_dir", "start_sec", "end_sec"] if "help" in argv[0]: print ("Usage: python parse_logs.py " + " ".join(["[%s=v]" % k for k in PARAMS])) return log_parser = LogParser() log_files = [] output_dir = "experiment" for arg in argv: kv = arg.split("=") if kv[0] == PARAMS[0]: log_dir = kv[1] unqualified_log_files = filter(lambda x: "sparrow_audit" in x, os.listdir(log_dir)) log_files = [os.path.join(log_dir, filename) for \ filename in unqualified_log_files] elif kv[0] == PARAMS[1]: output_dir = kv[1] elif kv[0] == PARAMS[2]: global START_SEC START_SEC = int(kv[1]) elif kv[0] == PARAMS[3]: global END_SEC END_SEC = int(kv[1]) else: print "Warning: ignoring parameter %s" % kv[0] if len(log_files) == 0: print "No valid log files found!" return logging.basicConfig(level=logging.DEBUG) for filename in log_files: log_parser.parse_file(filename) if not os.path.exists(output_dir): os.mkdir(output_dir) print "Outputting reservation queue length versus time" log_parser.output_reservation_queue_lengths(output_dir) print "Outputting tasks launched versus time" log_parser.output_tasks_launched_versus_time(output_dir) print "Outputting general results" log_parser.output_results(output_dir) log_parser.output_complete_incomplete_requests_vs_time(output_dir) log_parser.output_tasks_completed_vs_arrival(output_dir) log_parser.output_per_node_service_time(output_dir) log_parser.output_per_node_queued_time(output_dir) print "Outputting constrained/unconstrained results" constrained_requests = dict((request_id,request) for (request_id, request) in log_parser.get_requests().items() if request.constrained) print "%s constrained" % len(constrained_requests) log_parser.output_aggregate_stats(constrained_requests, output_dir, "_constrained") unconstrained_requests = dict((request_id,request) for (request_id, request) in log_parser.get_requests().items() if not request.constrained) print "%s unconstrained" % len(unconstrained_requests) log_parser.output_aggregate_stats(unconstrained_requests, output_dir, "_unconstrained") if __name__ == "__main__": main(sys.argv[1:]) ================================================ FILE: src/main/python/parse_logs.sh ================================================ #!/bin/sh # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # cd "`dirname $0`" PYTHONPATH="$PYTHONPATH:third_party" python parse_logs.py $@ ================================================ FILE: src/main/python/parse_per_task_logs.py ================================================ """ Parses a log file and outputs aggregated information about the experiment. All times are in milliseconds unless otherwise indicated. TODO(kay): Generally, make things fail more gracefully, since it's possible (and likely) that we'll see anomalies in the log files, but we still want to get as much info as possible out of them. """ import functools import logging import math import os import re import sys import stats import time INVALID_TIME = 0 INVALID_TIME_DELTA = -sys.maxint - 1 INVALID_QUEUE_LENGTH = -1 INVALID_ID = -1 TPCH_QUERY_ID_REGEX = re.compile('--(\d+) (\d+)--') START_SEC = 200 END_SEC = 300 """ from http://code.activestate.com/ recipes/511478-finding-the-percentile-of-the-values/ """ def get_percentile(N, percent, key=lambda x:x): """ Find the percentile of a list of values. Args: percent: a float value from 0.0 to 1.0. key: optional key function to compute value from each element of N. Returns: The percentile of the values """ if not N: return 0 k = (len(N)-1) * percent f = math.floor(k) c = math.ceil(k) if f == c: return key(N[int(k)]) d0 = key(N[int(f)]) * (c-k) d1 = key(N[int(c)]) * (k-f) return d0+d1 class Probe: def __init__(self, request_id, address): self.request_id = request_id self.address = address self.launch_time = INVALID_TIME self.received_time = INVALID_TIME self.completion_time = INVALID_TIME self.queue_length = INVALID_QUEUE_LENGTH self.__logger = logging.getLogger("Probe") def set_queue_length(self, queue_length): if self.queue_length != INVALID_QUEUE_LENGTH: self.__logger.warn(("Two queue lengths for request %s on machine %s" "expected only launch one") % (self.request_id, self.address)) self.queue_length = int(queue_length) def set_launch_time(self, time): if self.launch_time != INVALID_TIME: self.__logger.warn(("Probe for request %s on machine %s launched " "twice; expect it to only launch once") % (self.request_id, self.address)) self.launch_time = time def set_received_time(self, time): if self.received_time != INVALID_TIME: self.__logger.warn(("Probe for request %s on machine %s received " "twice; expect it to only be received once") % (self.request_id, self.address)) self.received_time = time def set_completion_time(self, time): if self.completion_time != INVALID_TIME: self.__logger.warn(("Probe for request %s on machine %s completed " "twice; expect it to only launch once") % (self.request_id, self.address)) self.completion_time = time def complete(self): """ Returns whether there's complete log information for this probe.""" if self.launch_time == INVALID_TIME: print "Missing probe launch time" return False if self.received_time == INVALID_TIME: print "Missing probe received time" return False if self.completion_time == INVALID_TIME: print "Missing probe completion time" return False return True def round_trip_time(self): """ Returns the delay experienced by the probing machine. """ return self.completion_time - self.launch_time def get_clock_skew(self): """ Returns the clock skew of the probed machine. Returns the number of milliseconds by which the probed machine is ahead of the probing machine. The caller should verify that complete information is available for this probe before calling this function. Ignores processing time at the node monitor, which we assume to be small. """ expected_received_time = (self.launch_time + self.completion_time) / 2. return self.received_time - expected_received_time class Task: """ Class to store information about a task. We store a variety of events corresponding to each task launch, as described in __init__ """ def __init__(self, id): self.__logger = logging.getLogger("Task") # When the scheduler (resident with the frontend) launched the task self.scheduler_launch_time = INVALID_TIME # When the node monitor queued the task for execution self.node_monitor_submit_time = INVALID_TIME # When the node monitor (resident with the backend) launched the task self.node_monitor_launch_time = INVALID_TIME # When the backend completed the task self.completion_time = INVALID_TIME # Estimate of the millis by which the machine this task ran on is # ahead of the node the task was scheduled from. self.clock_skew = INVALID_TIME_DELTA # Address of the machine that the task ran on. self.address = "" self.id = id def set_scheduler_launch_time(self, time): if self.scheduler_launch_time != INVALID_TIME: self.__logger.warn(("Task %s launched at scheduler twice; expect " "task to only launch once") % id) self.scheduler_launch_time = time def set_node_monitor_launch_time(self, address, time): if self.node_monitor_launch_time != INVALID_TIME: self.__logger.warn(("Task %s launched at %s twice; expect task to " "only launch once") % (id, address)) self.node_monitor_launch_time = time def set_node_monitor_submit_time(self, address, time): if self.node_monitor_submit_time != INVALID_TIME: self.__logger.warn(("Task %s submitted at %s twice; expect task to " "only submit once") % (id, address)) self.node_monitor_submit_time = time self.address = address def set_completion_time(self, time): if self.completion_time != INVALID_TIME: self.__logger.warn(("Task %s completed twice; " "expect task to only complete once") % id) self.completion_time = time def network_delay(self): """ Returns the network delay (as the difference between launch times). In the presence of clock skew, this may be negative. The caller should ensure that complete information is available for this task before calling this function. """ return (self.node_monitor_submit_time - self.clock_skew - self.scheduler_launch_time) def queued_time(self): """ Returns the time spent waiting to launch on the backend. """ return (self.node_monitor_launch_time - self.node_monitor_submit_time) def service_time(self): """ Returns the service time (time executing on backend).""" return (self.completion_time - self.node_monitor_launch_time) def complete(self): """ Returns whether we have complete information on this task. """ if self.scheduler_launch_time == INVALID_TIME: print "Missing task scheduler launch time" return False if self.node_monitor_launch_time == INVALID_TIME: print "Missing task node monitor launch time" return False if self.completion_time == INVALID_TIME: print "Missing task completion time" return False if self.clock_skew == INVALID_TIME_DELTA: print "Missing task clock skew" return False return True class Request: def __init__(self, id): self.__id = id self.__num_tasks = 0 self.__arrival_time = INVALID_TIME self.__tasks = {} # Map of machine addresses to probes. self.__probes = {} # Address of the scheduler that received the request (and placed it). self.__scheduler_address = "" self.__logger = logging.getLogger("Request") self.__user = "" # TPCH query number. self.tpch_id = INVALID_ID # Unique query identifier assigned by shark (used to differentiate # different executions of the same TPC-H query). self.shark_id = INVALID_ID # Spark stage ID self.stage_id = INVALID_ID self.constrained = False def __str__(self): 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)) return ret def probe_stats(self): probe_items_sorted = \ sorted(self.__probes.items(), key=lambda k:k[1].completion_time) # print ["%s " % x[1].completion_time for x in probe_items_sorted] machines_sorted = [k[0] for k in probe_items_sorted] out = [] for (i, machine) in enumerate(machines_sorted): for task in self.__tasks.values(): if task.address == machine: out.append(i) return out def add_arrival(self, time, num_tasks, address, user, description, constrained): self.__arrival_time = time self.__num_tasks = int(num_tasks) self.__scheduler_address = address self.constrained = False if constrained == "true": self.constrained = True description_parts = description.split("-") if len(description_parts) < 2: print "Description not formatted as Spark/Shark description: " + description else: self.stage_id = description_parts[-1] match = TPCH_QUERY_ID_REGEX.search(description) if match == None: is_warmup_query = (description.find("SPREAD_EVENLY") != -1) is_create_table_query = (description.find("create table denorm") != -1) if not (is_warmup_query or is_create_table_query): self.__logger.warn("Couldn't find TPCH query id in description: %s" % description) return # An identifier that's unique for the Shark driver, but not across all drivers. self.shark_id = match.group(1) self.tpch_id = match.group(2) #print ("Shark ID: %s, stage id: %s, TPCH id: %s for description %s" % # (self.shark_id, self.stage_id, self.tpch_id, description)) def add_probe_launch(self, address, time): probe = self.__get_probe(address) probe.set_launch_time(time) def add_probe_received(self, address, time): probe = self.__get_probe(address) probe.set_received_time(time) def add_probe_completion(self, address, queue_length, time): probe = self.__get_probe(address) probe.set_completion_time(time) probe.set_queue_length(queue_length) def add_scheduler_task_launch(self, task_id, launch_time): task = self.__get_task(task_id) task.set_scheduler_launch_time(launch_time) def add_node_monitor_task_launch(self, address, task_id, launch_time): task = self.__get_task(task_id) task.set_node_monitor_launch_time(address, launch_time) def add_node_monitor_task_submit(self, address, task_id, submit_time): task = self.__get_task(task_id) task.set_node_monitor_submit_time(address, submit_time) def add_task_completion(self, task_id, completion_time): # We might see a task completion before a task launch, depending on the # order that we read log files in. task = self.__get_task(task_id) task.set_completion_time(completion_time) def set_clock_skews(self): """ Sets the clock skews for all tasks. """ for task in self.__tasks.values(): if task.address not in self.__probes: #print self.__probes.keys() #self.__logger.warn(("No probe information for request %s, " # "machine %s") % (self.__id, task.address)) continue probe = self.__probes[task.address] if not probe.complete(): self.__logger.warn(("Probe information for request %s, machine " "%s incomplete") % (self.__id, task.address)) else: task.clock_skew = probe.get_clock_skew() def arrival_time(self): """ Returns the time at which the task arrived at the scheduler. """ return self.__arrival_time def scheduler_address(self): return self.__scheduler_address def clock_skews(self): """ Returns a map of machines to clock skews. Clock skews are given relative to the scheduler. """ clock_skews = {} for address, probe in self.__probes.items(): clock_skews[address] = probe.get_clock_skew() return clock_skews def network_delays(self): """ Returns a list of delays for all __tasks with delay information. """ network_delays = [] for task in self.__tasks.values(): if task.complete(): network_delays.append(task.network_delay()) if task.network_delay() > 20: print "Network delay over 20ms for %s" % self.__id #print task.node_monitor_submit_time #print task.scheduler_launch_time #print task.clock_skew #print task.id #print task.address #print return network_delays def service_times(self): """ Returns a list of service times for complete __tasks. """ service_times = [] for task in self.__tasks.values(): if task.complete(): x = task.service_time() service_times.append(task.service_time()) return service_times def optimal_response_time(self): return max([t.service_time() for t in self.__tasks.values()]) def queue_times(self): """ Returns a list of queue times for all complete __tasks. """ queue_times = [] for task in self.__tasks.values(): if task.complete(): queue_times.append(task.queued_time()) return queue_times def probe_times(self): """ Returns a list of probe delays for all complete __probes. """ probe_times = [] for probe in self.__probes.values(): if probe.complete(): if probe.round_trip_time() > 20: "Long probe: %s " %self.__id probe_times.append(probe.round_trip_time()) return probe_times def receive_and_probing_time(self): """ Returns the time from when the request arrived until the last probe completed. """ latest_completion = 0 for probe in self.__probes.values(): if probe.complete(): latest_completion = max(latest_completion, probe.completion_time) return latest_completion - self.__arrival_time def queue_lengths(self): """ Returns an array of queue lengths observed during all probes. """ out = [] for probe in self.__probes.values(): if probe.complete(): out.append(probe.queue_length) return out def probing_time(self): """ Returns the total time spent in probing for this request. """ earliest_launch = (time.time() * 1000)**2 latest_completion = 0 for probe in self.__probes.values(): if probe.complete(): earliest_launch = min(earliest_launch, probe.launch_time) latest_completion = max(latest_completion, probe.completion_time) return latest_completion - earliest_launch def worst_necessary_probe_time(self): """ Returns the nth longest probe time, where n is the number of tasks. This represents the thoeretical limit of the minimum time we could have spent probing that actually gets a probe from as many machines as we have tasks. Note that in practice, if we are only waiting for ||tasks|| machines to respond we might as well just send the tasks randomly. """ probe_times = self.probe_times() num_tasks = len(self.__tasks) if len(probe_times) < num_tasks: self.__logger.warn("Fewer probes send than tasks for task %s." % self.__id) if len(probe_times) == 0: return 0 return sorted(probe_times)[min(num_tasks - 1, len(probe_times) - 1)] def response_time(self, incorporate_skew=True): """ Returns the time from when the task arrived to when it completed. Returns -1 if we don't have completion information on the task. Note that we may have information about when the task completed, but not complete information about the task (e.g. we don't know when the task was launched). Arguments: incorporate_skew: Boolean specifying whether to incorporate the perceived skew in the response time. """ if self.__arrival_time == INVALID_TIME: self.__logger.debug("Request %s missing arrival time" % self.__id) return -1 completion_time = self.__arrival_time for task_id, task in self.__tasks.items(): if task.completion_time == INVALID_TIME: self.__logger.debug(("Task %s in request %s missing completion " "time") % (task_id, self.__id)) return INVALID_TIME_DELTA task_completion_time = task.completion_time if incorporate_skew: task_completion_time -= task.clock_skew # Here we compare two event times: the completion time, as # observed the the node monitor, minus the clock skew; and the # job arrival time, as observed by the scheduler. If the # adjusted completion time is before the arrival time, we know # we've made an error in calculating the clock skew.clock_skew if task_completion_time < self.__arrival_time: self.__logger.warn(("Task %s in request %s has estimated " "completion time before arrival time, " "indicating inaccuracy in clock skew " "computation.") % (task_id, self.__id)) else: if task.scheduler_launch_time > task.node_monitor_launch_time: self.__logger.warn("Task %s suggests clock skew: " % task_id) completion_time = max(completion_time, task_completion_time) if (completion_time - self.__arrival_time) > 2000: pass """ print "TRUE: %s" % (completion_time - self.__arrival_time) print self.network_delays() print self.service_times() print self.probing_time() print "EST: %s" % (max(self.service_times()) + max(self.network_delays()) + self.probing_time()) """ return completion_time - self.__arrival_time def complete(self): """ Returns whether we have complete info for the request. Due to incomplete log files, it's possible that we'll have completion information but not start information for a job. """ if (self.__num_tasks == 0 or self.__arrival_time == 0 or self.__num_tasks != len(self.__tasks)): print ("Expected to find %s tasks; found %s" % (self.__num_tasks, len(self.__tasks))) return False for task in self.__tasks.values(): if not task.complete(): return False if len(self.__probes) == 0: return False # Don't consider non-probing requests return True def __get_task(self, task_id): """ Gets the task from the map of __tasks. Creates a new task if the task with the given ID doesn't already exist. """ if task_id not in self.__tasks: self.__tasks[task_id] = Task(task_id) return self.__tasks[task_id] def __get_probe(self, address): """ Gets the probe from the map of __probes. Creates a new probe if the probe with the given address doesn't already exist. """ if address not in self.__probes: self.__probes[address] = Probe(self.__id, address) return self.__probes[address] class LogParser: """ Helps extract job information from log files. Attributes: requests: A map of strings specifying request IDs to jobs. """ CLASS_INDEX = 0 TIME_INDEX = 1 AUDIT_EVENT_INDEX = 2 def __init__(self): self.__requests = {} self.__logger = logging.getLogger("LogParser") self.__earliest_time = (time.time() * 1000)**2 def earliest_time(self): return self.__earliest_time def get_requests(self): return self.__requests def parse_file(self, filename): file = open(filename, "r") for line in file: # Strip off the newline at the end of the line. items = line[:-1].split("\t") # Time is expressed in epoch milliseconds. time = int(items[self.TIME_INDEX]) self.__earliest_time = min(self.__earliest_time, time) audit_event_params = " ".join(items[self.AUDIT_EVENT_INDEX:]).split(":") if audit_event_params[0] == "arrived": request = self.__get_request(audit_event_params[1]) request.add_arrival(time, audit_event_params[2], audit_event_params[3], audit_event_params[5], audit_event_params[6], audit_event_params[7]) elif audit_event_params[0] == "probe_launch": request = self.__get_request(audit_event_params[1]) request.add_probe_launch(audit_event_params[2], time) elif audit_event_params[0] == "probe_received": request = self.__get_request(audit_event_params[1]) request.add_probe_received(audit_event_params[2], time) elif audit_event_params[0] == "probe_completion": request = self.__get_request(audit_event_params[1]) request.add_probe_completion(audit_event_params[2], audit_event_params[3], time) elif audit_event_params[0] == "scheduler_launch": self.__add_scheduler_task_launch(audit_event_params[1], audit_event_params[2], time) elif audit_event_params[0] == "nodemonitor_task_runnable": self.__add_node_monitor_task_launch(audit_event_params[1], audit_event_params[2], audit_event_params[3], time) elif audit_event_params[0] == "nodemonitor_task_submitted": self.__add_node_monitor_task_submit(audit_event_params[1], audit_event_params[2], audit_event_params[3], time) elif audit_event_params[0] == "nodemonitor_task_completed": # First param = ip address is not used self.__add_task_completion(audit_event_params[1], audit_event_params[2], time) else: print "Unexpected event: " + audit_event_params[0] def output_results(self, file_prefix, constrained=""): # Response time is the time from when the job arrived at a scheduler # to when it completed. response_times = [] # Network/processing delay for each task. network_delays = [] service_times = [] queue_times = [] probe_times = [] probing_times = [] queue_lengths = [] rcv_probing_times = [] worst_probe_times = [] overheads = [] # Store clock skews as a map of pairs of addresses to a list of # (clock skew, time) pairs. Store addresses in tuple in increasing # order, so that we get the clock skew calculated in both directions. clock_skews = {} start_time = self.__earliest_time + (START_SEC * 1000) end_time = self.__earliest_time + (END_SEC * 1000) for request in self.__requests.values(): request.set_clock_skews() complete_requests = filter(lambda k: k.complete(), self.__requests.values()) print "%s complete requests" % len(complete_requests) considered_requests = filter(lambda k: k.arrival_time() >= start_time and k.arrival_time() <= end_time and k.complete(), self.__requests.values()) if constrained == "constrained": considered_requests = filter(lambda x: x.constrained, self.__requests.values()) elif constrained == "unconstrained": considered_requests = filter(lambda x: not x.constrained, self.__requests.values()) print "Included %s requests" % len(considered_requests) print "Excluded %s requests" % (len(self.__requests.values()) - len(considered_requests)) for request in considered_requests: scheduler_address = request.scheduler_address() for address, probe_skew in request.clock_skews().items(): if address > scheduler_address: address_pair = (scheduler_address, address) skew = probe_skew else: address_pair = (address, scheduler_address) skew = -probe_skew if address_pair not in clock_skews: clock_skews[address_pair] = [] clock_skews[address_pair].append((skew, request.arrival_time())) network_delays.extend(request.network_delays()) service_times.extend(request.service_times()) queue_times.extend(request.queue_times()) response_time = request.response_time() probe_times.extend(request.probe_times()) probing_times.append(request.probing_time()) queue_lengths.extend(request.queue_lengths()) rcv_probing_times.append(request.receive_and_probing_time()) worst_probe_times.append(request.worst_necessary_probe_time()) response_times.append(response_time) overheads.append(response_time - request.optimal_response_time()) # Output data for response time and network delay CDFs. results_filename = "%s_results%s.data" % (file_prefix, constrained) file = open(results_filename, "w") file.write("%ile\tResponseTime\tNetworkDelay\tServiceTime\tQueuedTime\tProbeTime\tRcvProbingTime\tProbingTime\tWorstProbeTime\tQueueLength\tOverhead\n") num_data_points = 100 response_times.sort() network_delays.sort() service_times.sort() queue_times.sort() queue_lengths.sort() probe_times.sort() probing_times.sort() rcv_probing_times.sort() worst_probe_times.sort() overheads.sort() for i in range(100): i = float(i) / 100 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, get_percentile(response_times, i), get_percentile(network_delays, i), get_percentile(service_times, i), get_percentile(queue_times, i), get_percentile(probe_times, i), get_percentile(rcv_probing_times, i), get_percentile(probing_times, i), get_percentile(worst_probe_times, i), get_percentile(queue_lengths, i), get_percentile(overheads, i))) file.close() return self.plot_response_time_cdf(results_filename, file_prefix) """ # Output data about clock skews. Currently this writes a different # file for each pair of machines; we may want to change this when # we do larger experiments. skew_filenames = [] for address_pair, skews in clock_skews.items(): skews.sort(key=lambda x: x[0]) filename = "%s_%s_%s_skew.data" % (file_prefix, address_pair[0], address_pair[1]) skew_filenames.append(filename) file = open(filename, "w") stride = max(1, len(skews) / num_data_points) for i, (skew, time) in enumerate(skews[::stride]): percentile = (i + 1) * stride * 1.0 / len(skews) file.write("%f\t%d\t%d\n" % (percentile, skew, time)) self.plot_skew_cdf(skew_filenames, file_prefix) """ summary_file = open("%s_response_time_summary" % file_prefix, 'w') summary_file.write("%s %s %s" % (get_percentile(response_times, .5), get_percentile(response_times, .95), get_percentile(response_times, .99))) summary_file.close() wait_times_per_queue_len = {} for request in considered_requests: for task in request._Request__tasks.values(): wait_time = task.queued_time() if task.address not in request._Request__probes: print "Excluding" continue queue_length = request._Request__probes[task.address].queue_length arr = wait_times_per_queue_len.get(queue_length, []) arr.append(wait_time) wait_times_per_queue_len[queue_length] = arr # Queue length vs response time files = [] # (file name, queue length, # items) for (queue_len, waits) in wait_times_per_queue_len.items(): fname = "queue_waits_%s.txt" % queue_len files.append((fname, queue_len, len(waits))) f = open(fname, 'w') waits.sort() for (i, wait) in enumerate(waits): f.write("%s\t%s\n" % (float(i)/len(waits), wait)) f.close() plot_fname = "wait_time.gp" plot_file = open(plot_fname, 'w') plot_file.write("set terminal postscript color\n") plot_file.write("set output 'wait_time.ps'\n") plot_file.write("set xrange [0:500]\n") parts = map(lambda x: "'%s' using 2:1 with lines lw 3 title '%s (n=%s)'" % (x[0], x[1], x[2]), files) plot = "plot " + ",\\\n".join(parts) plot_file.write(plot + "\n") plot_file.close() def plot_skew_cdf(self, skew_filenames, file_prefix): gnuplot_file = open("%s_skew_cdf.gp" % file_prefix, "w") gnuplot_file.write("set terminal postscript color\n") gnuplot_file.write("set output '%s_skew_cdf.ps'\n" % file_prefix) gnuplot_file.write("set xlabel 'Clock Skew (ms)'\n") gnuplot_file.write("set ylabel 'Cumulative Probability'\n") gnuplot_file.write("set y2label 'Arrival Time (ms)'\n") gnuplot_file.write("set yrange [0:1]\n") gnuplot_file.write("set ytics nomirror\n") gnuplot_file.write("set y2tics\n") gnuplot_file.write("plot ") for i, results_filename in enumerate(skew_filenames): if i > 0: gnuplot_file.write(",\\\n") gnuplot_file.write(("'%s' using 2:1 lw 4 with lp axis " "x1y1,\\\n") % results_filename) gnuplot_file.write("'%s' using 2:3 with p axis x1y2" % results_filename) gnuplot_file.close() def plot_response_time_cdf(self, results_filename, file_prefix): gnuplot_file = open("%s_response_time_cdf.gp" % file_prefix, "w") gnuplot_file.write("set terminal postscript color\n") gnuplot_file.write("set size 0.5,0.5\n") gnuplot_file.write("set output '%s_response_time_cdf.ps'\n" % file_prefix) gnuplot_file.write("set xlabel 'Response Time'\n") gnuplot_file.write("set ylabel 'Cumulative Probability'\n") gnuplot_file.write("set yrange [0:1]\n") gnuplot_file.write("plot '%s' using 2:1 lw 4 with lp\\\n" % results_filename) gnuplot_file.close() def __get_request(self, request_id): """ Gets the request from the map of requests. Creates a new request if a request with the given ID doesn't already exist. """ if request_id not in self.__requests: self.__requests[request_id] = Request(request_id) return self.__requests[request_id] def __add_scheduler_task_launch(self, request_id, task_id, time): request = self.__get_request(request_id) request.add_scheduler_task_launch(task_id, time) def __add_node_monitor_task_submit(self, address, request_id, task_id, time): request = self.__get_request(request_id) request.add_node_monitor_task_submit(address, task_id, time) def __add_node_monitor_task_launch(self, address, request_id, task_id, time): request = self.__get_request(request_id) request.add_node_monitor_task_launch(address, task_id, time) def __add_task_completion(self, request_id, task_id, time): request = self.__get_request(request_id) request.add_task_completion(task_id, time) def main(argv): PARAMS = ["log_dir", "output_file", "start_sec", "end_sec"] if "help" in argv[0]: print ("Usage: python parse_logs.py " + " ".join(["[%s=v]" % k for k in PARAMS])) return log_parser = LogParser() log_files = [] output_filename = "experiment" for arg in argv: kv = arg.split("=") if kv[0] == PARAMS[0]: log_dir = kv[1] unqualified_log_files = filter(lambda x: "sparrow_audit" in x, os.listdir(log_dir)) log_files = [os.path.join(log_dir, filename) for \ filename in unqualified_log_files] elif kv[0] == PARAMS[1]: output_filename = kv[1] elif kv[0] == PARAMS[2]: global START_SEC START_SEC = int(kv[1]) elif kv[0] == PARAMS[3]: global END_SEC END_SEC = int(kv[1]) else: print "Warning: ignoring parameter %s" % kv[0] if len(log_files) == 0: print "No valid log files found!" return logging.basicConfig(level=logging.DEBUG) for filename in log_files: log_parser.parse_file(filename) log_parser.output_results(output_filename) log_parser.output_results(output_filename, "constrained") log_parser.output_results(output_filename, "unconstrained") if __name__ == "__main__": main(sys.argv[1:]) ================================================ FILE: src/main/python/parse_per_task_logs.sh ================================================ #!/bin/sh # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # cd "`dirname $0`" PYTHONPATH="$PYTHONPATH:third_party" python parse_per_task_logs.py $@ ================================================ FILE: src/main/python/parse_tpch_logs.py ================================================ import logging import os import sys import parse_logs import parse_per_task_logs def main(argv): PARAMS = ["log_dir", "output_dir", "start_sec", "end_sec"] if "help" in argv[0]: print ("Usage: python parse_logs.py " + " ".join(["[%s=v]" % k for k in PARAMS])) return #log_parser = parse_per_task_logs.LogParser() log_parser = parse_logs.LogParser() # Use 5 minutes in the middle of the experiment, by default. start_sec = 400 end_sec = 500 log_files = [] output_dir = "experiment" for arg in argv: kv = arg.split("=") if kv[0] == PARAMS[0]: log_dir = kv[1] unqualified_log_files = filter(lambda x: "sparrow_audit" in x, os.listdir(log_dir)) log_files = [os.path.join(log_dir, filename) for \ filename in unqualified_log_files] elif kv[0] == PARAMS[1]: output_dir = kv[1] elif kv[0] == PARAMS[2]: start_sec = int(kv[1]) elif kv[0] == PARAMS[3]: end_sec = int(kv[1]) else: print "Warning: ignoring parameter %s" % kv[0] if len(log_files) == 0: print "No valid log files found!" return if not os.path.exists(output_dir): os.mkdir(output_dir) logging.basicConfig(level=logging.DEBUG) for filename in log_files: print "Parsing log %s" % filename log_parser.parse_file(filename) requests = log_parser.get_requests() # Separate out results for each query and each type of query, and use only # the results between START_TIME and END_TIME (relative to the beginning of the experiment). # TPCH query ID : particular query : requests map!\ earliest_time = log_parser.earliest_time() last_time = max([x.arrival_time() for x in requests.values()]) print last_time print earliest_time print "Last was %s after earliest" % (last_time - earliest_time) time_min = earliest_time + start_sec * 1000 time_max = earliest_time + end_sec * 1000 print "Min time: %s, max time: %s" % (time_min, time_max) query_type_to_queries = {} incomplete = 0 for r in requests.values(): #r.set_clock_skews() if not r.complete(): incomplete += 1 continue if r.tpch_id not in query_type_to_queries: query_type_to_queries[r.tpch_id] = {} queries = query_type_to_queries[r.tpch_id] # This assumes that only one shark frontend is submitting queries to # each scheduler. query_id = (r.shark_id, r.scheduler_address()) if query_id not in queries: queries[query_id] = [] queries[query_id].append(r) print "%s incomplete requests" % incomplete too_early = 0 too_late = 0 used_requests = 0 total_time = 0 total_tasks = 0 total_jobs = 0 constrained_jobs = 0 for tpch_id, queries in query_type_to_queries.iteritems(): print "Parsing queries for %s" % tpch_id optimals = [] actuals = [] fulls = [] for id_tuple, requests in queries.iteritems(): requests.sort(key = lambda x: x.arrival_time()) # Check whether the query started within the right interval. query_arrival = requests[0].arrival_time() if query_arrival < time_min: too_early += 1 continue elif query_arrival > time_max: too_late += 1 continue used_requests += 1 optimal = 0 actual = 0 start = -1 end = 0 total_jobs += len(requests) for request in requests: if request.constrained: constrained_jobs += 1 #print request service_times = request.service_times() total_time += sum(service_times) total_tasks += len(service_times) opt = request.optimal_response_time() optimal += opt act = request.response_time() actual += act #print ("Request from %s (Shark %s, stage %s, arrival %s, constrained: %s): optimal %s, actual %s" % # (id_tuple[1], id_tuple[0], request.stage_id, request.arrival_time(), request.constrained, opt, act)) if start == -1: #print "setting start %s" % request.arrival_time() start = request.arrival_time() end = request.arrival_time() + request.response_time() #print "For query %s from %s: optimal %s actual %s full %s" % (id_tuple[1], id_tuple[0], optimal, actual, end - start) #print "end: %s" % end optimals.append(optimal) actuals.append(actual) fulls.append(end - start) optimals.sort() actuals.sort() file = open("%s/results_%s" % (output_dir, tpch_id), "w") file.write("optimal\tactual\n") NUM_DATA_POINTS = 100 for i in range(NUM_DATA_POINTS): i = float(i) / NUM_DATA_POINTS file.write("%f\t%d\t%d\n" % (i, parse_logs.get_percentile(optimals, i), parse_logs.get_percentile(actuals, i))) file.close() total_slots = 400.00 load = total_time / (total_slots * (end_sec - start_sec) * 1000) file = open("%s/summary" % output_dir, 'w') file.write("Load %s (total time: %s)\n" % (load, total_time)) file.write("%s too early, %s too late, %s total used\n" % (too_early, too_late, used_requests)) file.write("%s total jobs" % (total_jobs)) file.write("%s constrained jobs" % constrained_jobs) print "Completed TPCH analysis, results in %s" % output_dir if __name__ == "__main__": main(sys.argv[1:]) ================================================ FILE: src/main/python/parse_tpch_logs.sh ================================================ #!/bin/sh # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # cd "`dirname $0`" PYTHONPATH="$PYTHONPATH:third_party" python parse_tpch_logs.py $@ ================================================ FILE: src/main/python/service_per_node.py ================================================ import sys for f in sys.argv[1:]: start_times = {} service_times = [] for line in open(f): if "task_runnable" in line: parts = line.split("\t") time = int(parts[1]) task = parts[2].split(":")[2] + ":" + parts[2].split(":")[3] start_times[task] = time if "task_completed" in line: parts = line.split("\t") time = int(parts[1]) task = parts[2].split(":")[1] + ":" + parts[2].split(":")[2] service_times.append(time - start_times[task]) if len(service_times) == 0: continue avg = sum(service_times) * 1.0 / (len(service_times) * 1000) print "%.3f\t%s" % (avg, f) ================================================ FILE: src/main/python/third_party/stats.py ================================================ # Copyright (c) 1999-2007 Gary Strangman; All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # # Comments and/or additions are welcome (send e-mail to: # strang@nmr.mgh.harvard.edu). # """ stats.py module (Requires pstats.py module.) ################################################# ####### Written by: Gary Strangman ########### ####### Last modified: Dec 18, 2007 ########### ################################################# A collection of basic statistical functions for python. The function names appear below. IMPORTANT: There are really *3* sets of functions. The first set has an 'l' prefix, which can be used with list or tuple arguments. The second set has an 'a' prefix, which can accept NumPy array arguments. These latter functions are defined only when NumPy is available on the system. The third type has NO prefix (i.e., has the name that appears below). Functions of this set are members of a "Dispatch" class, c/o David Ascher. This class allows different functions to be called depending on the type of the passed arguments. Thus, stats.mean is a member of the Dispatch class and stats.mean(range(20)) will call stats.lmean(range(20)) while stats.mean(Numeric.arange(20)) will call stats.amean(Numeric.arange(20)). This is a handy way to keep consistent function names when different argument types require different functions to be called. Having implementated the Dispatch class, however, means that to get info on a given function, you must use the REAL function name ... that is "print stats.lmean.__doc__" or "print stats.amean.__doc__" work fine, while "print stats.mean.__doc__" will print the doc for the Dispatch class. NUMPY FUNCTIONS ('a' prefix) generally have more argument options but should otherwise be consistent with the corresponding list functions. Disclaimers: The function list is obviously incomplete and, worse, the functions are not optimized. All functions have been tested (some more so than others), but they are far from bulletproof. Thus, as with any free software, no warranty or guarantee is expressed or implied. :-) A few extra functions that don't appear in the list below can be found by interested treasure-hunters. These functions don't necessarily have both list and array versions but were deemed useful CENTRAL TENDENCY: geometricmean harmonicmean mean median medianscore mode MOMENTS: moment variation skew kurtosis skewtest (for Numpy arrays only) kurtosistest (for Numpy arrays only) normaltest (for Numpy arrays only) ALTERED VERSIONS: tmean (for Numpy arrays only) tvar (for Numpy arrays only) tmin (for Numpy arrays only) tmax (for Numpy arrays only) tstdev (for Numpy arrays only) tsem (for Numpy arrays only) describe FREQUENCY STATS: itemfreq scoreatpercentile percentileofscore histogram cumfreq relfreq VARIABILITY: obrientransform samplevar samplestdev signaltonoise (for Numpy arrays only) var stdev sterr sem z zs zmap (for Numpy arrays only) TRIMMING FCNS: threshold (for Numpy arrays only) trimboth trim1 round (round all vals to 'n' decimals; Numpy only) CORRELATION FCNS: covariance (for Numpy arrays only) correlation (for Numpy arrays only) paired pearsonr spearmanr pointbiserialr kendalltau linregress INFERENTIAL STATS: ttest_1samp ttest_ind ttest_rel chisquare ks_2samp mannwhitneyu ranksums wilcoxont kruskalwallish friedmanchisquare PROBABILITY CALCS: chisqprob erfcc zprob ksprob fprob betacf gammln betai ANOVA FUNCTIONS: F_oneway F_value SUPPORT FUNCTIONS: writecc incr sign (for Numpy arrays only) sum cumsum ss summult sumdiffsquared square_of_sums shellsort rankdata outputpairedstats findwithin """ ## CHANGE LOG: ## =========== ## 07-11.26 ... conversion for numpy started ## 07-05-16 ... added Lin's Concordance Correlation Coefficient (alincc) and acov ## 05-08-21 ... added "Dice's coefficient" ## 04-10-26 ... added ap2t(), an ugly fcn for converting p-vals to T-vals ## 04-04-03 ... added amasslinregress() function to do regression on N-D arrays ## 03-01-03 ... CHANGED VERSION TO 0.6 ## fixed atsem() to properly handle limits=None case ## improved histogram and median functions (estbinwidth) and ## fixed atvar() function (wrong answers for neg numbers?!?) ## 02-11-19 ... fixed attest_ind and attest_rel for div-by-zero Overflows ## 02-05-10 ... fixed lchisqprob indentation (failed when df=even) ## 00-12-28 ... removed aanova() to separate module, fixed licensing to ## match Python License, fixed doc string & imports ## 00-04-13 ... pulled all "global" statements, except from aanova() ## added/fixed lots of documentation, removed io.py dependency ## changed to version 0.5 ## 99-11-13 ... added asign() function ## 99-11-01 ... changed version to 0.4 ... enough incremental changes now ## 99-10-25 ... added acovariance and acorrelation functions ## 99-10-10 ... fixed askew/akurtosis to avoid divide-by-zero errors ## added aglm function (crude, but will be improved) ## 99-10-04 ... upgraded acumsum, ass, asummult, asamplevar, avar, etc. to ## all handle lists of 'dimension's and keepdims ## REMOVED ar0, ar2, ar3, ar4 and replaced them with around ## reinserted fixes for abetai to avoid math overflows ## 99-09-05 ... rewrote achisqprob/aerfcc/aksprob/afprob/abetacf/abetai to ## handle multi-dimensional arrays (whew!) ## 99-08-30 ... fixed l/amoment, l/askew, l/akurtosis per D'Agostino (1990) ## added anormaltest per same reference ## re-wrote azprob to calc arrays of probs all at once ## 99-08-22 ... edited attest_ind printing section so arrays could be rounded ## 99-08-19 ... fixed amean and aharmonicmean for non-error(!) overflow on ## short/byte arrays (mean of #s btw 100-300 = -150??) ## 99-08-09 ... fixed asum so that the None case works for Byte arrays ## 99-08-08 ... fixed 7/3 'improvement' to handle t-calcs on N-D arrays ## 99-07-03 ... improved attest_ind, attest_rel (zero-division errortrap) ## 99-06-24 ... fixed bug(?) in attest_ind (n1=a.shape[0]) ## 04/11/99 ... added asignaltonoise, athreshold functions, changed all ## max/min in array section to N.maximum/N.minimum, ## fixed square_of_sums to prevent integer overflow ## 04/10/99 ... !!! Changed function name ... sumsquared ==> square_of_sums ## 03/18/99 ... Added ar0, ar2, ar3 and ar4 rounding functions ## 02/28/99 ... Fixed aobrientransform to return an array rather than a list ## 01/15/99 ... Essentially ceased updating list-versions of functions (!!!) ## 01/13/99 ... CHANGED TO VERSION 0.3 ## fixed bug in a/lmannwhitneyu p-value calculation ## 12/31/98 ... fixed variable-name bug in ldescribe ## 12/19/98 ... fixed bug in findwithin (fcns needed pstats. prefix) ## 12/16/98 ... changed amedianscore to return float (not array) for 1 score ## 12/14/98 ... added atmin and atmax functions ## removed umath from import line (not needed) ## l/ageometricmean modified to reduce chance of overflows (take ## nth root first, then multiply) ## 12/07/98 ... added __version__variable (now 0.2) ## removed all 'stats.' from anova() fcn ## 12/06/98 ... changed those functions (except shellsort) that altered ## arguments in-place ... cumsum, ranksort, ... ## updated (and fixed some) doc-strings ## 12/01/98 ... added anova() function (requires NumPy) ## incorporated Dispatch class ## 11/12/98 ... added functionality to amean, aharmonicmean, ageometricmean ## added 'asum' function (added functionality to N.add.reduce) ## fixed both moment and amoment (two errors) ## changed name of skewness and askewness to skew and askew ## fixed (a)histogram (which sometimes counted points =len(inlist)/2.0: cfbin = i break LRL = smallest + binsize*cfbin # get lower read limit of that bin cfbelow = cumhist[cfbin-1] freq = float(hist[cfbin]) # frequency IN the 50%ile bin median = LRL + ((len(inlist)/2.0 - cfbelow)/float(freq))*binsize # median formula return median def lmedianscore (inlist): """ Returns the 'middle' score of the passed list. If there is an even number of scores, the mean of the 2 middle scores is returned. Usage: lmedianscore(inlist) """ newlist = copy.deepcopy(inlist) newlist.sort() if len(newlist) % 2 == 0: # if even number of scores, average middle 2 index = len(newlist)/2 # integer division correct median = float(newlist[index] + newlist[index-1]) /2 else: index = len(newlist)/2 # int divsion gives mid value when count from 0 median = newlist[index] return median def lmode(inlist): """ Returns a list of the modal (most common) score(s) in the passed list. If there is more than one such score, all are returned. The bin-count for the mode(s) is also returned. Usage: lmode(inlist) Returns: bin-count for mode(s), a list of modal value(s) """ scores = pstats.unique(inlist) scores.sort() freq = [] for item in scores: freq.append(inlist.count(item)) maxfreq = max(freq) mode = [] stillmore = 1 while stillmore: try: indx = freq.index(maxfreq) mode.append(scores[indx]) del freq[indx] del scores[indx] except ValueError: stillmore=0 return maxfreq, mode #################################### ############ MOMENTS ############# #################################### def lmoment(inlist,moment=1): """ Calculates the nth moment about the mean for a sample (defaults to the 1st moment). Used to calculate coefficients of skewness and kurtosis. Usage: lmoment(inlist,moment=1) Returns: appropriate moment (r) from ... 1/n * SUM((inlist(i)-mean)**r) """ if moment == 1: return 0.0 else: mn = mean(inlist) n = len(inlist) s = 0 for x in inlist: s = s + (x-mn)**moment return s/float(n) def lvariation(inlist): """ Returns the coefficient of variation, as defined in CRC Standard Probability and Statistics, p.6. Usage: lvariation(inlist) """ return 100.0*samplestdev(inlist)/float(mean(inlist)) def lskew(inlist): """ Returns the skewness of a distribution, as defined in Numerical Recipies (alternate defn in CRC Standard Probability and Statistics, p.6.) Usage: lskew(inlist) """ return moment(inlist,3)/pow(moment(inlist,2),1.5) def lkurtosis(inlist): """ Returns the kurtosis of a distribution, as defined in Numerical Recipies (alternate defn in CRC Standard Probability and Statistics, p.6.) Usage: lkurtosis(inlist) """ return moment(inlist,4)/pow(moment(inlist,2),2.0) def ldescribe(inlist): """ Returns some descriptive statistics of the passed list (assumed to be 1D). Usage: ldescribe(inlist) Returns: n, mean, standard deviation, skew, kurtosis """ n = len(inlist) mm = (min(inlist),max(inlist)) m = mean(inlist) sd = stdev(inlist) sk = skew(inlist) kurt = kurtosis(inlist) return n, mm, m, sd, sk, kurt #################################### ####### FREQUENCY STATS ########## #################################### def litemfreq(inlist): """ Returns a list of pairs. Each pair consists of one of the scores in inlist and it's frequency count. Assumes a 1D list is passed. Usage: litemfreq(inlist) Returns: a 2D frequency table (col [0:n-1]=scores, col n=frequencies) """ scores = pstats.unique(inlist) scores.sort() freq = [] for item in scores: freq.append(inlist.count(item)) return pstats.abut(scores, freq) def lscoreatpercentile (inlist, percent): """ Returns the score at a given percentile relative to the distribution given by inlist. Usage: lscoreatpercentile(inlist,percent) """ if percent > 1: print "\nDividing percent>1 by 100 in lscoreatpercentile().\n" percent = percent / 100.0 targetcf = percent*len(inlist) h, lrl, binsize, extras = histogram(inlist) cumhist = cumsum(copy.deepcopy(h)) for i in range(len(cumhist)): if cumhist[i] >= targetcf: break score = binsize * ((targetcf - cumhist[i-1]) / float(h[i])) + (lrl+binsize*i) return score def lpercentileofscore (inlist, score,histbins=10,defaultlimits=None): """ Returns the percentile value of a score relative to the distribution given by inlist. Formula depends on the values used to histogram the data(!). Usage: lpercentileofscore(inlist,score,histbins=10,defaultlimits=None) """ h, lrl, binsize, extras = histogram(inlist,histbins,defaultlimits) cumhist = cumsum(copy.deepcopy(h)) i = int((score - lrl)/float(binsize)) pct = (cumhist[i-1]+((score-(lrl+binsize*i))/float(binsize))*h[i])/float(len(inlist)) * 100 return pct def lhistogram (inlist,numbins=10,defaultreallimits=None,printextras=0): """ Returns (i) a list of histogram bin counts, (ii) the smallest value of the histogram binning, and (iii) the bin width (the last 2 are not necessarily integers). Default number of bins is 10. If no sequence object is given for defaultreallimits, the routine picks (usually non-pretty) bins spanning all the numbers in the inlist. Usage: lhistogram (inlist, numbins=10, defaultreallimits=None,suppressoutput=0) Returns: list of bin values, lowerreallimit, binsize, extrapoints """ if (defaultreallimits <> None): if type(defaultreallimits) not in [ListType,TupleType] or len(defaultreallimits)==1: # only one limit given, assumed to be lower one & upper is calc'd lowerreallimit = defaultreallimits upperreallimit = 1.000001 * max(inlist) else: # assume both limits given lowerreallimit = defaultreallimits[0] upperreallimit = defaultreallimits[1] binsize = (upperreallimit-lowerreallimit)/float(numbins) else: # no limits given for histogram, both must be calc'd estbinwidth=(max(inlist)-min(inlist))/float(numbins) +1e-6 #1=>cover all binsize = ((max(inlist)-min(inlist)+estbinwidth))/float(numbins) lowerreallimit = min(inlist) - binsize/2 #lower real limit,1st bin bins = [0]*(numbins) extrapoints = 0 for num in inlist: try: if (num-lowerreallimit) < 0: extrapoints = extrapoints + 1 else: bintoincrement = int((num-lowerreallimit)/float(binsize)) bins[bintoincrement] = bins[bintoincrement] + 1 except: extrapoints = extrapoints + 1 if (extrapoints > 0 and printextras == 1): print '\nPoints outside given histogram range =',extrapoints return (bins, lowerreallimit, binsize, extrapoints) def lcumfreq(inlist,numbins=10,defaultreallimits=None): """ Returns a cumulative frequency histogram, using the histogram function. Usage: lcumfreq(inlist,numbins=10,defaultreallimits=None) Returns: list of cumfreq bin values, lowerreallimit, binsize, extrapoints """ h,l,b,e = histogram(inlist,numbins,defaultreallimits) cumhist = cumsum(copy.deepcopy(h)) return cumhist,l,b,e def lrelfreq(inlist,numbins=10,defaultreallimits=None): """ Returns a relative frequency histogram, using the histogram function. Usage: lrelfreq(inlist,numbins=10,defaultreallimits=None) Returns: list of cumfreq bin values, lowerreallimit, binsize, extrapoints """ h,l,b,e = histogram(inlist,numbins,defaultreallimits) for i in range(len(h)): h[i] = h[i]/float(len(inlist)) return h,l,b,e #################################### ##### VARIABILITY FUNCTIONS ###### #################################### def lobrientransform(*args): """ Computes a transform on input data (any number of columns). Used to test for homogeneity of variance prior to running one-way stats. From Maxwell and Delaney, p.112. Usage: lobrientransform(*args) Returns: transformed data for use in an ANOVA """ TINY = 1e-10 k = len(args) n = [0.0]*k v = [0.0]*k m = [0.0]*k nargs = [] for i in range(k): nargs.append(copy.deepcopy(args[i])) n[i] = float(len(nargs[i])) v[i] = var(nargs[i]) m[i] = mean(nargs[i]) for j in range(k): for i in range(n[j]): t1 = (n[j]-1.5)*n[j]*(nargs[j][i]-m[j])**2 t2 = 0.5*v[j]*(n[j]-1.0) t3 = (n[j]-1.0)*(n[j]-2.0) nargs[j][i] = (t1-t2) / float(t3) check = 1 for j in range(k): if v[j] - mean(nargs[j]) > TINY: check = 0 if check <> 1: raise ValueError, 'Problem in obrientransform.' else: return nargs def lsamplevar (inlist): """ Returns the variance of the values in the passed list using N for the denominator (i.e., DESCRIBES the sample variance only). Usage: lsamplevar(inlist) """ n = len(inlist) mn = mean(inlist) deviations = [] for item in inlist: deviations.append(item-mn) return ss(deviations)/float(n) def lsamplestdev (inlist): """ Returns the standard deviation of the values in the passed list using N for the denominator (i.e., DESCRIBES the sample stdev only). Usage: lsamplestdev(inlist) """ return math.sqrt(samplevar(inlist)) def lcov (x,y, keepdims=0): """ Returns the estimated covariance of the values in the passed array (i.e., N-1). Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Set keepdims=1 to return an array with the same number of dimensions as inarray. Usage: lcov(x,y,keepdims=0) """ n = len(x) xmn = mean(x) ymn = mean(y) xdeviations = [0]*len(x) ydeviations = [0]*len(y) for i in range(len(x)): xdeviations[i] = x[i] - xmn ydeviations[i] = y[i] - ymn ss = 0.0 for i in range(len(xdeviations)): ss = ss + xdeviations[i]*ydeviations[i] return ss/float(n-1) def lvar (inlist): """ Returns the variance of the values in the passed list using N-1 for the denominator (i.e., for estimating population variance). Usage: lvar(inlist) """ n = len(inlist) mn = mean(inlist) deviations = [0]*len(inlist) for i in range(len(inlist)): deviations[i] = inlist[i] - mn return ss(deviations)/float(n-1) def lstdev (inlist): """ Returns the standard deviation of the values in the passed list using N-1 in the denominator (i.e., to estimate population stdev). Usage: lstdev(inlist) """ return math.sqrt(var(inlist)) def lsterr(inlist): """ Returns the standard error of the values in the passed list using N-1 in the denominator (i.e., to estimate population standard error). Usage: lsterr(inlist) """ return stdev(inlist) / float(math.sqrt(len(inlist))) def lsem (inlist): """ Returns the estimated standard error of the mean (sx-bar) of the values in the passed list. sem = stdev / sqrt(n) Usage: lsem(inlist) """ sd = stdev(inlist) n = len(inlist) return sd/math.sqrt(n) def lz (inlist, score): """ Returns the z-score for a given input score, given that score and the list from which that score came. Not appropriate for population calculations. Usage: lz(inlist, score) """ z = (score-mean(inlist))/samplestdev(inlist) return z def lzs (inlist): """ Returns a list of z-scores, one for each score in the passed list. Usage: lzs(inlist) """ zscores = [] for item in inlist: zscores.append(z(inlist,item)) return zscores #################################### ####### TRIMMING FUNCTIONS ####### #################################### def ltrimboth (l,proportiontocut): """ Slices off the passed proportion of items from BOTH ends of the passed list (i.e., with proportiontocut=0.1, slices 'leftmost' 10% AND 'rightmost' 10% of scores. Assumes list is sorted by magnitude. Slices off LESS if proportion results in a non-integer slice index (i.e., conservatively slices off proportiontocut). Usage: ltrimboth (l,proportiontocut) Returns: trimmed version of list l """ lowercut = int(proportiontocut*len(l)) uppercut = len(l) - lowercut return l[lowercut:uppercut] def ltrim1 (l,proportiontocut,tail='right'): """ Slices off the passed proportion of items from ONE end of the passed list (i.e., if proportiontocut=0.1, slices off 'leftmost' or 'rightmost' 10% of scores). Slices off LESS if proportion results in a non-integer slice index (i.e., conservatively slices off proportiontocut). Usage: ltrim1 (l,proportiontocut,tail='right') or set tail='left' Returns: trimmed version of list l """ if tail == 'right': lowercut = 0 uppercut = len(l) - int(proportiontocut*len(l)) elif tail == 'left': lowercut = int(proportiontocut*len(l)) uppercut = len(l) return l[lowercut:uppercut] #################################### ##### CORRELATION FUNCTIONS ###### #################################### def lpaired(x,y): """ Interactively determines the type of data and then runs the appropriated statistic for paired group data. Usage: lpaired(x,y) Returns: appropriate statistic name, value, and probability """ samples = '' while samples not in ['i','r','I','R','c','C']: print '\nIndependent or related samples, or correlation (i,r,c): ', samples = raw_input() if samples in ['i','I','r','R']: print '\nComparing variances ...', # USE O'BRIEN'S TEST FOR HOMOGENEITY OF VARIANCE, Maxwell & delaney, p.112 r = obrientransform(x,y) f,p = F_oneway(pstats.colex(r,0),pstats.colex(r,1)) if p<0.05: vartype='unequal, p='+str(round(p,4)) else: vartype='equal' print vartype if samples in ['i','I']: if vartype[0]=='e': t,p = ttest_ind(x,y,0) print '\nIndependent samples t-test: ', round(t,4),round(p,4) else: if len(x)>20 or len(y)>20: z,p = ranksums(x,y) print '\nRank Sums test (NONparametric, n>20): ', round(z,4),round(p,4) else: u,p = mannwhitneyu(x,y) print '\nMann-Whitney U-test (NONparametric, ns<20): ', round(u,4),round(p,4) else: # RELATED SAMPLES if vartype[0]=='e': t,p = ttest_rel(x,y,0) print '\nRelated samples t-test: ', round(t,4),round(p,4) else: t,p = ranksums(x,y) print '\nWilcoxon T-test (NONparametric): ', round(t,4),round(p,4) else: # CORRELATION ANALYSIS corrtype = '' while corrtype not in ['c','C','r','R','d','D']: print '\nIs the data Continuous, Ranked, or Dichotomous (c,r,d): ', corrtype = raw_input() if corrtype in ['c','C']: m,b,r,p,see = linregress(x,y) print '\nLinear regression for continuous variables ...' lol = [['Slope','Intercept','r','Prob','SEestimate'],[round(m,4),round(b,4),round(r,4),round(p,4),round(see,4)]] pstats.printcc(lol) elif corrtype in ['r','R']: r,p = spearmanr(x,y) print '\nCorrelation for ranked variables ...' print "Spearman's r: ",round(r,4),round(p,4) else: # DICHOTOMOUS r,p = pointbiserialr(x,y) print '\nAssuming x contains a dichotomous variable ...' print 'Point Biserial r: ',round(r,4),round(p,4) print '\n\n' return None def lpearsonr(x,y): """ Calculates a Pearson correlation coefficient and the associated probability value. Taken from Heiman's Basic Statistics for the Behav. Sci (2nd), p.195. Usage: lpearsonr(x,y) where x and y are equal-length lists Returns: Pearson's r value, two-tailed p-value """ TINY = 1.0e-30 if len(x) <> len(y): raise ValueError, 'Input values not paired in pearsonr. Aborting.' n = len(x) x = map(float,x) y = map(float,y) xmean = mean(x) ymean = mean(y) r_num = n*(summult(x,y)) - sum(x)*sum(y) r_den = math.sqrt((n*ss(x) - square_of_sums(x))*(n*ss(y)-square_of_sums(y))) r = (r_num / r_den) # denominator already a float df = n-2 t = r*math.sqrt(df/((1.0-r+TINY)*(1.0+r+TINY))) prob = betai(0.5*df,0.5,df/float(df+t*t)) return r, prob def llincc(x,y): """ Calculates Lin's concordance correlation coefficient. Usage: alincc(x,y) where x, y are equal-length arrays Returns: Lin's CC """ covar = lcov(x,y)*(len(x)-1)/float(len(x)) # correct denom to n xvar = lvar(x)*(len(x)-1)/float(len(x)) # correct denom to n yvar = lvar(y)*(len(y)-1)/float(len(y)) # correct denom to n lincc = (2 * covar) / ((xvar+yvar) +((amean(x)-amean(y))**2)) return lincc def lspearmanr(x,y): """ Calculates a Spearman rank-order correlation coefficient. Taken from Heiman's Basic Statistics for the Behav. Sci (1st), p.192. Usage: lspearmanr(x,y) where x and y are equal-length lists Returns: Spearman's r, two-tailed p-value """ TINY = 1e-30 if len(x) <> len(y): raise ValueError, 'Input values not paired in spearmanr. Aborting.' n = len(x) rankx = rankdata(x) ranky = rankdata(y) dsq = sumdiffsquared(rankx,ranky) rs = 1 - 6*dsq / float(n*(n**2-1)) t = rs * math.sqrt((n-2) / ((rs+1.0)*(1.0-rs))) df = n-2 probrs = betai(0.5*df,0.5,df/(df+t*t)) # t already a float # probability values for rs are from part 2 of the spearman function in # Numerical Recipies, p.510. They are close to tables, but not exact. (?) return rs, probrs def lpointbiserialr(x,y): """ Calculates a point-biserial correlation coefficient and the associated probability value. Taken from Heiman's Basic Statistics for the Behav. Sci (1st), p.194. Usage: lpointbiserialr(x,y) where x,y are equal-length lists Returns: Point-biserial r, two-tailed p-value """ TINY = 1e-30 if len(x) <> len(y): raise ValueError, 'INPUT VALUES NOT PAIRED IN pointbiserialr. ABORTING.' data = pstats.abut(x,y) categories = pstats.unique(x) if len(categories) <> 2: raise ValueError, "Exactly 2 categories required for pointbiserialr()." else: # there are 2 categories, continue codemap = pstats.abut(categories,range(2)) recoded = pstats.recode(data,codemap,0) x = pstats.linexand(data,0,categories[0]) y = pstats.linexand(data,0,categories[1]) xmean = mean(pstats.colex(x,1)) ymean = mean(pstats.colex(y,1)) n = len(data) adjust = math.sqrt((len(x)/float(n))*(len(y)/float(n))) rpb = (ymean - xmean)/samplestdev(pstats.colex(data,1))*adjust df = n-2 t = rpb*math.sqrt(df/((1.0-rpb+TINY)*(1.0+rpb+TINY))) prob = betai(0.5*df,0.5,df/(df+t*t)) # t already a float return rpb, prob def lkendalltau(x,y): """ Calculates Kendall's tau ... correlation of ordinal data. Adapted from function kendl1 in Numerical Recipies. Needs good test-routine.@@@ Usage: lkendalltau(x,y) Returns: Kendall's tau, two-tailed p-value """ n1 = 0 n2 = 0 iss = 0 for j in range(len(x)-1): for k in range(j,len(y)): a1 = x[j] - x[k] a2 = y[j] - y[k] aa = a1 * a2 if (aa): # neither list has a tie n1 = n1 + 1 n2 = n2 + 1 if aa > 0: iss = iss + 1 else: iss = iss -1 else: if (a1): n1 = n1 + 1 else: n2 = n2 + 1 tau = iss / math.sqrt(n1*n2) svar = (4.0*len(x)+10.0) / (9.0*len(x)*(len(x)-1)) z = tau / math.sqrt(svar) prob = erfcc(abs(z)/1.4142136) return tau, prob def llinregress(x,y): """ Calculates a regression line on x,y pairs. Usage: llinregress(x,y) x,y are equal-length lists of x-y coordinates Returns: slope, intercept, r, two-tailed prob, sterr-of-estimate """ TINY = 1.0e-20 if len(x) <> len(y): raise ValueError, 'Input values not paired in linregress. Aborting.' n = len(x) x = map(float,x) y = map(float,y) xmean = mean(x) ymean = mean(y) r_num = float(n*(summult(x,y)) - sum(x)*sum(y)) r_den = math.sqrt((n*ss(x) - square_of_sums(x))*(n*ss(y)-square_of_sums(y))) r = r_num / r_den z = 0.5*math.log((1.0+r+TINY)/(1.0-r+TINY)) df = n-2 t = r*math.sqrt(df/((1.0-r+TINY)*(1.0+r+TINY))) prob = betai(0.5*df,0.5,df/(df+t*t)) slope = r_num / float(n*ss(x) - square_of_sums(x)) intercept = ymean - slope*xmean sterrest = math.sqrt(1-r*r)*samplestdev(y) return slope, intercept, r, prob, sterrest #################################### ##### INFERENTIAL STATISTICS ##### #################################### def lttest_1samp(a,popmean,printit=0,name='Sample',writemode='a'): """ Calculates the t-obtained for the independent samples T-test on ONE group of scores a, given a population mean. If printit=1, results are printed to the screen. If printit='filename', the results are output to 'filename' using the given writemode (default=append). Returns t-value, and prob. Usage: lttest_1samp(a,popmean,Name='Sample',printit=0,writemode='a') Returns: t-value, two-tailed prob """ x = mean(a) v = var(a) n = len(a) df = n-1 svar = ((n-1)*v)/float(df) t = (x-popmean)/math.sqrt(svar*(1.0/n)) prob = betai(0.5*df,0.5,float(df)/(df+t*t)) if printit <> 0: statname = 'Single-sample T-test.' outputpairedstats(printit,writemode, 'Population','--',popmean,0,0,0, name,n,x,v,min(a),max(a), statname,t,prob) return t,prob def lttest_ind (a, b, printit=0, name1='Samp1', name2='Samp2', writemode='a'): """ Calculates the t-obtained T-test on TWO INDEPENDENT samples of scores a, and b. From Numerical Recipies, p.483. If printit=1, results are printed to the screen. If printit='filename', the results are output to 'filename' using the given writemode (default=append). Returns t-value, and prob. Usage: lttest_ind(a,b,printit=0,name1='Samp1',name2='Samp2',writemode='a') Returns: t-value, two-tailed prob """ x1 = mean(a) x2 = mean(b) v1 = stdev(a)**2 v2 = stdev(b)**2 n1 = len(a) n2 = len(b) df = n1+n2-2 svar = ((n1-1)*v1+(n2-1)*v2)/float(df) t = (x1-x2)/math.sqrt(svar*(1.0/n1 + 1.0/n2)) prob = betai(0.5*df,0.5,df/(df+t*t)) if printit <> 0: statname = 'Independent samples T-test.' outputpairedstats(printit,writemode, name1,n1,x1,v1,min(a),max(a), name2,n2,x2,v2,min(b),max(b), statname,t,prob) return t,prob def lttest_rel (a,b,printit=0,name1='Sample1',name2='Sample2',writemode='a'): """ Calculates the t-obtained T-test on TWO RELATED samples of scores, a and b. From Numerical Recipies, p.483. If printit=1, results are printed to the screen. If printit='filename', the results are output to 'filename' using the given writemode (default=append). Returns t-value, and prob. Usage: lttest_rel(a,b,printit=0,name1='Sample1',name2='Sample2',writemode='a') Returns: t-value, two-tailed prob """ if len(a)<>len(b): raise ValueError, 'Unequal length lists in ttest_rel.' x1 = mean(a) x2 = mean(b) v1 = var(a) v2 = var(b) n = len(a) cov = 0 for i in range(len(a)): cov = cov + (a[i]-x1) * (b[i]-x2) df = n-1 cov = cov / float(df) sd = math.sqrt((v1+v2 - 2.0*cov)/float(n)) t = (x1-x2)/sd prob = betai(0.5*df,0.5,df/(df+t*t)) if printit <> 0: statname = 'Related samples T-test.' outputpairedstats(printit,writemode, name1,n,x1,v1,min(a),max(a), name2,n,x2,v2,min(b),max(b), statname,t,prob) return t, prob def lchisquare(f_obs,f_exp=None): """ Calculates a one-way chi square for list of observed frequencies and returns the result. If no expected frequencies are given, the total N is assumed to be equally distributed across all groups. Usage: lchisquare(f_obs, f_exp=None) f_obs = list of observed cell freq. Returns: chisquare-statistic, associated p-value """ k = len(f_obs) # number of groups if f_exp == None: f_exp = [sum(f_obs)/float(k)] * len(f_obs) # create k bins with = freq. chisq = 0 for i in range(len(f_obs)): chisq = chisq + (f_obs[i]-f_exp[i])**2 / float(f_exp[i]) return chisq, chisqprob(chisq, k-1) def lks_2samp (data1,data2): """ Computes the Kolmogorov-Smirnof statistic on 2 samples. From Numerical Recipies in C, page 493. Usage: lks_2samp(data1,data2) data1&2 are lists of values for 2 conditions Returns: KS D-value, associated p-value """ j1 = 0 j2 = 0 fn1 = 0.0 fn2 = 0.0 n1 = len(data1) n2 = len(data2) en1 = n1 en2 = n2 d = 0.0 data1.sort() data2.sort() while j1 < n1 and j2 < n2: d1=data1[j1] d2=data2[j2] if d1 <= d2: fn1 = (j1)/float(en1) j1 = j1 + 1 if d2 <= d1: fn2 = (j2)/float(en2) j2 = j2 + 1 dt = (fn2-fn1) if math.fabs(dt) > math.fabs(d): d = dt try: en = math.sqrt(en1*en2/float(en1+en2)) prob = ksprob((en+0.12+0.11/en)*abs(d)) except: prob = 1.0 return d, prob def lmannwhitneyu(x,y): """ Calculates a Mann-Whitney U statistic on the provided scores and returns the result. Use only when the n in each condition is < 20 and you have 2 independent samples of ranks. NOTE: Mann-Whitney U is significant if the u-obtained is LESS THAN or equal to the critical value of U found in the tables. Equivalent to Kruskal-Wallis H with just 2 groups. Usage: lmannwhitneyu(data) Returns: u-statistic, one-tailed p-value (i.e., p(z(U))) """ n1 = len(x) n2 = len(y) ranked = rankdata(x+y) rankx = ranked[0:n1] # get the x-ranks ranky = ranked[n1:] # the rest are y-ranks u1 = n1*n2 + (n1*(n1+1))/2.0 - sum(rankx) # calc U for x u2 = n1*n2 - u1 # remainder is U for y bigu = max(u1,u2) smallu = min(u1,u2) T = math.sqrt(tiecorrect(ranked)) # correction factor for tied scores if T == 0: raise ValueError, 'All numbers are identical in lmannwhitneyu' sd = math.sqrt(T*n1*n2*(n1+n2+1)/12.0) z = abs((bigu-n1*n2/2.0) / sd) # normal approximation for prob calc return smallu, 1.0 - zprob(z) def ltiecorrect(rankvals): """ Corrects for ties in Mann Whitney U and Kruskal Wallis H tests. See Siegel, S. (1956) Nonparametric Statistics for the Behavioral Sciences. New York: McGraw-Hill. Code adapted from |Stat rankind.c code. Usage: ltiecorrect(rankvals) Returns: T correction factor for U or H """ sorted,posn = shellsort(rankvals) n = len(sorted) T = 0.0 i = 0 while (i 20 and you have 2 independent samples of ranks. Usage: lranksums(x,y) Returns: a z-statistic, two-tailed p-value """ n1 = len(x) n2 = len(y) alldata = x+y ranked = rankdata(alldata) x = ranked[:n1] y = ranked[n1:] s = sum(x) expected = n1*(n1+n2+1) / 2.0 z = (s - expected) / math.sqrt(n1*n2*(n1+n2+1)/12.0) prob = 2*(1.0 -zprob(abs(z))) return z, prob def lwilcoxont(x,y): """ Calculates the Wilcoxon T-test for related samples and returns the result. A non-parametric T-test. Usage: lwilcoxont(x,y) Returns: a t-statistic, two-tail probability estimate """ if len(x) <> len(y): raise ValueError, 'Unequal N in wilcoxont. Aborting.' d=[] for i in range(len(x)): diff = x[i] - y[i] if diff <> 0: d.append(diff) count = len(d) absd = map(abs,d) absranked = rankdata(absd) r_plus = 0.0 r_minus = 0.0 for i in range(len(absd)): if d[i] < 0: r_minus = r_minus + absranked[i] else: r_plus = r_plus + absranked[i] wt = min(r_plus, r_minus) mn = count * (count+1) * 0.25 se = math.sqrt(count*(count+1)*(2.0*count+1.0)/24.0) z = math.fabs(wt-mn) / se prob = 2*(1.0 -zprob(abs(z))) return wt, prob def lkruskalwallish(*args): """ The Kruskal-Wallis H-test is a non-parametric ANOVA for 3 or more groups, requiring at least 5 subjects in each group. This function calculates the Kruskal-Wallis H-test for 3 or more independent samples and returns the result. Usage: lkruskalwallish(*args) Returns: H-statistic (corrected for ties), associated p-value """ args = list(args) n = [0]*len(args) all = [] n = map(len,args) for i in range(len(args)): all = all + args[i] ranked = rankdata(all) T = tiecorrect(ranked) for i in range(len(args)): args[i] = ranked[0:n[i]] del ranked[0:n[i]] rsums = [] for i in range(len(args)): rsums.append(sum(args[i])**2) rsums[i] = rsums[i] / float(n[i]) ssbn = sum(rsums) totaln = sum(n) h = 12.0 / (totaln*(totaln+1)) * ssbn - 3*(totaln+1) df = len(args) - 1 if T == 0: raise ValueError, 'All numbers are identical in lkruskalwallish' h = h / float(T) return h, chisqprob(h,df) def lfriedmanchisquare(*args): """ Friedman Chi-Square is a non-parametric, one-way within-subjects ANOVA. This function calculates the Friedman Chi-square test for repeated measures and returns the result, along with the associated probability value. It assumes 3 or more repeated measures. Only 3 levels requires a minimum of 10 subjects in the study. Four levels requires 5 subjects per level(??). Usage: lfriedmanchisquare(*args) Returns: chi-square statistic, associated p-value """ k = len(args) if k < 3: raise ValueError, 'Less than 3 levels. Friedman test not appropriate.' n = len(args[0]) data = apply(pstats.abut,tuple(args)) for i in range(len(data)): data[i] = rankdata(data[i]) ssbn = 0 for i in range(k): ssbn = ssbn + sum(args[i])**2 chisq = 12.0 / (k*n*(k+1)) * ssbn - 3*n*(k+1) return chisq, chisqprob(chisq,k-1) #################################### #### PROBABILITY CALCULATIONS #### #################################### def lchisqprob(chisq,df): """ Returns the (1-tailed) probability value associated with the provided chi-square value and df. Adapted from chisq.c in Gary Perlman's |Stat. Usage: lchisqprob(chisq,df) """ BIG = 20.0 def ex(x): BIG = 20.0 if x < -BIG: return 0.0 else: return math.exp(x) if chisq <=0 or df < 1: return 1.0 a = 0.5 * chisq if df%2 == 0: even = 1 else: even = 0 if df > 1: y = ex(-a) if even: s = y else: s = 2.0 * zprob(-math.sqrt(chisq)) if (df > 2): chisq = 0.5 * (df - 1.0) if even: z = 1.0 else: z = 0.5 if a > BIG: if even: e = 0.0 else: e = math.log(math.sqrt(math.pi)) c = math.log(a) while (z <= chisq): e = math.log(z) + e s = s + ex(c*z-a-e) z = z + 1.0 return s else: if even: e = 1.0 else: e = 1.0 / math.sqrt(math.pi) / math.sqrt(a) c = 0.0 while (z <= chisq): e = e * (a/float(z)) c = c + e z = z + 1.0 return (c*y+s) else: return s def lerfcc(x): """ Returns the complementary error function erfc(x) with fractional error everywhere less than 1.2e-7. Adapted from Numerical Recipies. Usage: lerfcc(x) """ z = abs(x) t = 1.0 / (1.0+0.5*z) 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))))))))) if x >= 0: return ans else: return 2.0 - ans def lzprob(z): """ Returns the area under the normal curve 'to the left of' the given z value. Thus, for z<0, zprob(z) = 1-tail probability for z>0, 1.0-zprob(z) = 1-tail probability for any z, 2.0*(1.0-zprob(abs(z))) = 2-tail probability Adapted from z.c in Gary Perlman's |Stat. Usage: lzprob(z) """ Z_MAX = 6.0 # maximum meaningful z-value if z == 0.0: x = 0.0 else: y = 0.5 * math.fabs(z) if y >= (Z_MAX*0.5): x = 1.0 elif (y < 1.0): w = y*y x = ((((((((0.000124818987 * w -0.001075204047) * w +0.005198775019) * w -0.019198292004) * w +0.059054035642) * w -0.151968751364) * w +0.319152932694) * w -0.531923007300) * w +0.797884560593) * y * 2.0 else: y = y - 2.0 x = (((((((((((((-0.000045255659 * y +0.000152529290) * y -0.000019538132) * y -0.000676904986) * y +0.001390604284) * y -0.000794620820) * y -0.002034254874) * y +0.006549791214) * y -0.010557625006) * y +0.011630447319) * y -0.009279453341) * y +0.005353579108) * y -0.002141268741) * y +0.000535310849) * y +0.999936657524 if z > 0.0: prob = ((x+1.0)*0.5) else: prob = ((1.0-x)*0.5) return prob def lksprob(alam): """ Computes a Kolmolgorov-Smirnov t-test significance level. Adapted from Numerical Recipies. Usage: lksprob(alam) """ fac = 2.0 sum = 0.0 termbf = 0.0 a2 = -2.0*alam*alam for j in range(1,201): term = fac*math.exp(a2*j*j) sum = sum + term if math.fabs(term) <= (0.001*termbf) or math.fabs(term) < (1.0e-8*sum): return sum fac = -fac termbf = math.fabs(term) return 1.0 # Get here only if fails to converge; was 0.0!! def lfprob (dfnum, dfden, F): """ Returns the (1-tailed) significance level (p-value) of an F statistic given the degrees of freedom for the numerator (dfR-dfF) and the degrees of freedom for the denominator (dfF). Usage: lfprob(dfnum, dfden, F) where usually dfnum=dfbn, dfden=dfwn """ p = betai(0.5*dfden, 0.5*dfnum, dfden/float(dfden+dfnum*F)) return p def lbetacf(a,b,x): """ This function evaluates the continued fraction form of the incomplete Beta function, betai. (Adapted from: Numerical Recipies in C.) Usage: lbetacf(a,b,x) """ ITMAX = 200 EPS = 3.0e-7 bm = az = am = 1.0 qab = a+b qap = a+1.0 qam = a-1.0 bz = 1.0-qab*x/qap for i in range(ITMAX+1): em = float(i+1) tem = em + em d = em*(b-em)*x/((qam+tem)*(a+tem)) ap = az + d*am bp = bz+d*bm d = -(a+em)*(qab+em)*x/((qap+tem)*(a+tem)) app = ap+d*az bpp = bp+d*bz aold = az am = ap/bpp bm = bp/bpp az = app/bpp bz = 1.0 if (abs(az-aold)<(EPS*abs(az))): return az print 'a or b too big, or ITMAX too small in Betacf.' def lgammln(xx): """ Returns the gamma function of xx. Gamma(z) = Integral(0,infinity) of t^(z-1)exp(-t) dt. (Adapted from: Numerical Recipies in C.) Usage: lgammln(xx) """ coeff = [76.18009173, -86.50532033, 24.01409822, -1.231739516, 0.120858003e-2, -0.536382e-5] x = xx - 1.0 tmp = x + 5.5 tmp = tmp - (x+0.5)*math.log(tmp) ser = 1.0 for j in range(len(coeff)): x = x + 1 ser = ser + coeff[j]/x return -tmp + math.log(2.50662827465*ser) def lbetai(a,b,x): """ Returns the incomplete beta function: I-sub-x(a,b) = 1/B(a,b)*(Integral(0,x) of t^(a-1)(1-t)^(b-1) dt) where a,b>0 and B(a,b) = G(a)*G(b)/(G(a+b)) where G(a) is the gamma function of a. The continued fraction formulation is implemented here, using the betacf function. (Adapted from: Numerical Recipies in C.) Usage: lbetai(a,b,x) """ if (x<0.0 or x>1.0): raise ValueError, 'Bad x in lbetai' if (x==0.0 or x==1.0): bt = 0.0 else: bt = math.exp(gammln(a+b)-gammln(a)-gammln(b)+a*math.log(x)+b* math.log(1.0-x)) if (x<(a+1.0)/(a+b+2.0)): return bt*betacf(a,b,x)/float(a) else: return 1.0-bt*betacf(b,a,1.0-x)/float(b) #################################### ####### ANOVA CALCULATIONS ####### #################################### def lF_oneway(*lists): """ Performs a 1-way ANOVA, returning an F-value and probability given any number of groups. From Heiman, pp.394-7. Usage: F_oneway(*lists) where *lists is any number of lists, one per treatment group Returns: F value, one-tailed p-value """ a = len(lists) # ANOVA on 'a' groups, each in it's own list means = [0]*a vars = [0]*a ns = [0]*a alldata = [] tmp = map(N.array,lists) means = map(amean,tmp) vars = map(avar,tmp) ns = map(len,lists) for i in range(len(lists)): alldata = alldata + lists[i] alldata = N.array(alldata) bign = len(alldata) sstot = ass(alldata)-(asquare_of_sums(alldata)/float(bign)) ssbn = 0 for list in lists: ssbn = ssbn + asquare_of_sums(N.array(list))/float(len(list)) ssbn = ssbn - (asquare_of_sums(alldata)/float(bign)) sswn = sstot-ssbn dfbn = a-1 dfwn = bign - a msb = ssbn/float(dfbn) msw = sswn/float(dfwn) f = msb/msw prob = fprob(dfbn,dfwn,f) return f, prob def lF_value (ER,EF,dfnum,dfden): """ Returns an F-statistic given the following: ER = error associated with the null hypothesis (the Restricted model) EF = error associated with the alternate hypothesis (the Full model) dfR-dfF = degrees of freedom of the numerator dfF = degrees of freedom associated with the denominator/Full model Usage: lF_value(ER,EF,dfnum,dfden) """ return ((ER-EF)/float(dfnum) / (EF/float(dfden))) #################################### ######## SUPPORT FUNCTIONS ####### #################################### def writecc (listoflists,file,writetype='w',extra=2): """ Writes a list of lists to a file in columns, customized by the max size of items within the columns (max size of items in col, +2 characters) to specified file. File-overwrite is the default. Usage: writecc (listoflists,file,writetype='w',extra=2) Returns: None """ if type(listoflists[0]) not in [ListType,TupleType]: listoflists = [listoflists] outfile = open(file,writetype) rowstokill = [] list2print = copy.deepcopy(listoflists) for i in range(len(listoflists)): if listoflists[i] == ['\n'] or listoflists[i]=='\n' or listoflists[i]=='dashes': rowstokill = rowstokill + [i] rowstokill.reverse() for row in rowstokill: del list2print[row] maxsize = [0]*len(list2print[0]) for col in range(len(list2print[0])): items = pstats.colex(list2print,col) items = map(pstats.makestr,items) maxsize[col] = max(map(len,items)) + extra for row in listoflists: if row == ['\n'] or row == '\n': outfile.write('\n') elif row == ['dashes'] or row == 'dashes': dashes = [0]*len(maxsize) for j in range(len(maxsize)): dashes[j] = '-'*(maxsize[j]-2) outfile.write(pstats.lineincustcols(dashes,maxsize)) else: outfile.write(pstats.lineincustcols(row,maxsize)) outfile.write('\n') outfile.close() return None def lincr(l,cap): # to increment a list up to a max-list of 'cap' """ Simulate a counting system from an n-dimensional list. Usage: lincr(l,cap) l=list to increment, cap=max values for each list pos'n Returns: next set of values for list l, OR -1 (if overflow) """ l[0] = l[0] + 1 # e.g., [0,0,0] --> [2,4,3] (=cap) for i in range(len(l)): if l[i] > cap[i] and i < len(l)-1: # if carryover AND not done l[i] = 0 l[i+1] = l[i+1] + 1 elif l[i] > cap[i] and i == len(l)-1: # overflow past last column, must be finished l = -1 return l def lsum (inlist): """ Returns the sum of the items in the passed list. Usage: lsum(inlist) """ s = 0 for item in inlist: s = s + item return s def lcumsum (inlist): """ Returns a list consisting of the cumulative sum of the items in the passed list. Usage: lcumsum(inlist) """ newlist = copy.deepcopy(inlist) for i in range(1,len(newlist)): newlist[i] = newlist[i] + newlist[i-1] return newlist def lss(inlist): """ Squares each value in the passed list, adds up these squares and returns the result. Usage: lss(inlist) """ ss = 0 for item in inlist: ss = ss + item*item return ss def lsummult (list1,list2): """ Multiplies elements in list1 and list2, element by element, and returns the sum of all resulting multiplications. Must provide equal length lists. Usage: lsummult(list1,list2) """ if len(list1) <> len(list2): raise ValueError, "Lists not equal length in summult." s = 0 for item1,item2 in pstats.abut(list1,list2): s = s + item1*item2 return s def lsumdiffsquared(x,y): """ Takes pairwise differences of the values in lists x and y, squares these differences, and returns the sum of these squares. Usage: lsumdiffsquared(x,y) Returns: sum[(x[i]-y[i])**2] """ sds = 0 for i in range(len(x)): sds = sds + (x[i]-y[i])**2 return sds def lsquare_of_sums(inlist): """ Adds the values in the passed list, squares the sum, and returns the result. Usage: lsquare_of_sums(inlist) Returns: sum(inlist[i])**2 """ s = sum(inlist) return float(s)*s def lshellsort(inlist): """ Shellsort algorithm. Sorts a 1D-list. Usage: lshellsort(inlist) Returns: sorted-inlist, sorting-index-vector (for original list) """ n = len(inlist) svec = copy.deepcopy(inlist) ivec = range(n) gap = n/2 # integer division needed while gap >0: for i in range(gap,n): for j in range(i-gap,-1,-gap): while j>=0 and svec[j]>svec[j+gap]: temp = svec[j] svec[j] = svec[j+gap] svec[j+gap] = temp itemp = ivec[j] ivec[j] = ivec[j+gap] ivec[j+gap] = itemp gap = gap / 2 # integer division needed # svec is now sorted inlist, and ivec has the order svec[i] = vec[ivec[i]] return svec, ivec def lrankdata(inlist): """ Ranks the data in inlist, dealing with ties appropritely. Assumes a 1D inlist. Adapted from Gary Perlman's |Stat ranksort. Usage: lrankdata(inlist) Returns: a list of length equal to inlist, containing rank scores """ n = len(inlist) svec, ivec = shellsort(inlist) sumranks = 0 dupcount = 0 newlist = [0]*n for i in range(n): sumranks = sumranks + i dupcount = dupcount + 1 if i==n-1 or svec[i] <> svec[i+1]: averank = sumranks / float(dupcount) + 1 for j in range(i-dupcount+1,i+1): newlist[ivec[j]] = averank sumranks = 0 dupcount = 0 return newlist def outputpairedstats(fname,writemode,name1,n1,m1,se1,min1,max1,name2,n2,m2,se2,min2,max2,statname,stat,prob): """ Prints or write to a file stats for two groups, using the name, n, mean, sterr, min and max for each group, as well as the statistic name, its value, and the associated p-value. Usage: outputpairedstats(fname,writemode, name1,n1,mean1,stderr1,min1,max1, name2,n2,mean2,stderr2,min2,max2, statname,stat,prob) Returns: None """ suffix = '' # for *s after the p-value try: x = prob.shape prob = prob[0] except: pass if prob < 0.001: suffix = ' ***' elif prob < 0.01: suffix = ' **' elif prob < 0.05: suffix = ' *' title = [['Name','N','Mean','SD','Min','Max']] lofl = title+[[name1,n1,round(m1,3),round(math.sqrt(se1),3),min1,max1], [name2,n2,round(m2,3),round(math.sqrt(se2),3),min2,max2]] if type(fname)<>StringType or len(fname)==0: print print statname print pstats.printcc(lofl) print try: if stat.shape == (): stat = stat[0] if prob.shape == (): prob = prob[0] except: pass print 'Test statistic = ',round(stat,3),' p = ',round(prob,3),suffix print else: file = open(fname,writemode) file.write('\n'+statname+'\n\n') file.close() writecc(lofl,fname,'a') file = open(fname,'a') try: if stat.shape == (): stat = stat[0] if prob.shape == (): prob = prob[0] except: pass file.write(pstats.list2string(['\nTest statistic = ',round(stat,4),' p = ',round(prob,4),suffix,'\n\n'])) file.close() return None def lfindwithin (data): """ Returns an integer representing a binary vector, where 1=within- subject factor, 0=between. Input equals the entire data 2D list (i.e., column 0=random factor, column -1=measured values (those two are skipped). Note: input data is in |Stat format ... a list of lists ("2D list") with one row per measured value, first column=subject identifier, last column= score, one in-between column per factor (these columns contain level designations on each factor). See also stats.anova.__doc__. Usage: lfindwithin(data) data in |Stat format """ numfact = len(data[0])-1 withinvec = 0 for col in range(1,numfact): examplelevel = pstats.unique(pstats.colex(data,col))[0] rows = pstats.linexand(data,col,examplelevel) # get 1 level of this factor factsubjs = pstats.unique(pstats.colex(rows,0)) allsubjs = pstats.unique(pstats.colex(data,0)) if len(factsubjs) == len(allsubjs): # fewer Ss than scores on this factor? withinvec = withinvec + (1 << col) return withinvec ######################################################### ######################################################### ####### DISPATCH LISTS AND TUPLES TO ABOVE FCNS ######### ######################################################### ######################################################### ## CENTRAL TENDENCY: geometricmean = Dispatch ( (lgeometricmean, (ListType, TupleType)), ) harmonicmean = Dispatch ( (lharmonicmean, (ListType, TupleType)), ) mean = Dispatch ( (lmean, (ListType, TupleType)), ) median = Dispatch ( (lmedian, (ListType, TupleType)), ) medianscore = Dispatch ( (lmedianscore, (ListType, TupleType)), ) mode = Dispatch ( (lmode, (ListType, TupleType)), ) ## MOMENTS: moment = Dispatch ( (lmoment, (ListType, TupleType)), ) variation = Dispatch ( (lvariation, (ListType, TupleType)), ) skew = Dispatch ( (lskew, (ListType, TupleType)), ) kurtosis = Dispatch ( (lkurtosis, (ListType, TupleType)), ) describe = Dispatch ( (ldescribe, (ListType, TupleType)), ) ## FREQUENCY STATISTICS: itemfreq = Dispatch ( (litemfreq, (ListType, TupleType)), ) scoreatpercentile = Dispatch ( (lscoreatpercentile, (ListType, TupleType)), ) percentileofscore = Dispatch ( (lpercentileofscore, (ListType, TupleType)), ) histogram = Dispatch ( (lhistogram, (ListType, TupleType)), ) cumfreq = Dispatch ( (lcumfreq, (ListType, TupleType)), ) relfreq = Dispatch ( (lrelfreq, (ListType, TupleType)), ) ## VARIABILITY: obrientransform = Dispatch ( (lobrientransform, (ListType, TupleType)), ) samplevar = Dispatch ( (lsamplevar, (ListType, TupleType)), ) samplestdev = Dispatch ( (lsamplestdev, (ListType, TupleType)), ) var = Dispatch ( (lvar, (ListType, TupleType)), ) stdev = Dispatch ( (lstdev, (ListType, TupleType)), ) sterr = Dispatch ( (lsterr, (ListType, TupleType)), ) sem = Dispatch ( (lsem, (ListType, TupleType)), ) z = Dispatch ( (lz, (ListType, TupleType)), ) zs = Dispatch ( (lzs, (ListType, TupleType)), ) ## TRIMMING FCNS: trimboth = Dispatch ( (ltrimboth, (ListType, TupleType)), ) trim1 = Dispatch ( (ltrim1, (ListType, TupleType)), ) ## CORRELATION FCNS: paired = Dispatch ( (lpaired, (ListType, TupleType)), ) pearsonr = Dispatch ( (lpearsonr, (ListType, TupleType)), ) spearmanr = Dispatch ( (lspearmanr, (ListType, TupleType)), ) pointbiserialr = Dispatch ( (lpointbiserialr, (ListType, TupleType)), ) kendalltau = Dispatch ( (lkendalltau, (ListType, TupleType)), ) linregress = Dispatch ( (llinregress, (ListType, TupleType)), ) ## INFERENTIAL STATS: ttest_1samp = Dispatch ( (lttest_1samp, (ListType, TupleType)), ) ttest_ind = Dispatch ( (lttest_ind, (ListType, TupleType)), ) ttest_rel = Dispatch ( (lttest_rel, (ListType, TupleType)), ) chisquare = Dispatch ( (lchisquare, (ListType, TupleType)), ) ks_2samp = Dispatch ( (lks_2samp, (ListType, TupleType)), ) mannwhitneyu = Dispatch ( (lmannwhitneyu, (ListType, TupleType)), ) ranksums = Dispatch ( (lranksums, (ListType, TupleType)), ) tiecorrect = Dispatch ( (ltiecorrect, (ListType, TupleType)), ) wilcoxont = Dispatch ( (lwilcoxont, (ListType, TupleType)), ) kruskalwallish = Dispatch ( (lkruskalwallish, (ListType, TupleType)), ) friedmanchisquare = Dispatch ( (lfriedmanchisquare, (ListType, TupleType)), ) ## PROBABILITY CALCS: chisqprob = Dispatch ( (lchisqprob, (IntType, FloatType)), ) zprob = Dispatch ( (lzprob, (IntType, FloatType)), ) ksprob = Dispatch ( (lksprob, (IntType, FloatType)), ) fprob = Dispatch ( (lfprob, (IntType, FloatType)), ) betacf = Dispatch ( (lbetacf, (IntType, FloatType)), ) betai = Dispatch ( (lbetai, (IntType, FloatType)), ) erfcc = Dispatch ( (lerfcc, (IntType, FloatType)), ) gammln = Dispatch ( (lgammln, (IntType, FloatType)), ) ## ANOVA FUNCTIONS: F_oneway = Dispatch ( (lF_oneway, (ListType, TupleType)), ) F_value = Dispatch ( (lF_value, (ListType, TupleType)), ) ## SUPPORT FUNCTIONS: incr = Dispatch ( (lincr, (ListType, TupleType)), ) sum = Dispatch ( (lsum, (ListType, TupleType)), ) cumsum = Dispatch ( (lcumsum, (ListType, TupleType)), ) ss = Dispatch ( (lss, (ListType, TupleType)), ) summult = Dispatch ( (lsummult, (ListType, TupleType)), ) square_of_sums = Dispatch ( (lsquare_of_sums, (ListType, TupleType)), ) sumdiffsquared = Dispatch ( (lsumdiffsquared, (ListType, TupleType)), ) shellsort = Dispatch ( (lshellsort, (ListType, TupleType)), ) rankdata = Dispatch ( (lrankdata, (ListType, TupleType)), ) findwithin = Dispatch ( (lfindwithin, (ListType, TupleType)), ) #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== #============= THE ARRAY-VERSION OF THE STATS FUNCTIONS =============== try: # DEFINE THESE *ONLY* IF NUMERIC IS AVAILABLE import numpy as N import numpy.linalg as LA ##################################### ######## ACENTRAL TENDENCY ######## ##################################### def ageometricmean (inarray,dimension=None,keepdims=0): """ Calculates the geometric mean of the values in the passed array. That is: n-th root of (x1 * x2 * ... * xn). Defaults to ALL values in the passed array. Use dimension=None to flatten array first. REMEMBER: if dimension=0, it collapses over dimension 0 ('rows' in a 2D array) only, and if dimension is a sequence, it collapses over all specified dimensions. If keepdims is set to 1, the resulting array will have as many dimensions as inarray, with only 1 'level' per dim that was collapsed over. Usage: ageometricmean(inarray,dimension=None,keepdims=0) Returns: geometric mean computed over dim(s) listed in dimension """ inarray = N.array(inarray,N.float_) if dimension == None: inarray = N.ravel(inarray) size = len(inarray) mult = N.power(inarray,1.0/size) mult = N.multiply.reduce(mult) elif type(dimension) in [IntType,FloatType]: size = inarray.shape[dimension] mult = N.power(inarray,1.0/size) mult = N.multiply.reduce(mult,dimension) if keepdims == 1: shp = list(inarray.shape) shp[dimension] = 1 sum = N.reshape(sum,shp) else: # must be a SEQUENCE of dims to average over dims = list(dimension) dims.sort() dims.reverse() size = N.array(N.multiply.reduce(N.take(inarray.shape,dims)),N.float_) mult = N.power(inarray,1.0/size) for dim in dims: mult = N.multiply.reduce(mult,dim) if keepdims == 1: shp = list(inarray.shape) for dim in dims: shp[dim] = 1 mult = N.reshape(mult,shp) return mult def aharmonicmean (inarray,dimension=None,keepdims=0): """ Calculates the harmonic mean of the values in the passed array. That is: n / (1/x1 + 1/x2 + ... + 1/xn). Defaults to ALL values in the passed array. Use dimension=None to flatten array first. REMEMBER: if dimension=0, it collapses over dimension 0 ('rows' in a 2D array) only, and if dimension is a sequence, it collapses over all specified dimensions. If keepdims is set to 1, the resulting array will have as many dimensions as inarray, with only 1 'level' per dim that was collapsed over. Usage: aharmonicmean(inarray,dimension=None,keepdims=0) Returns: harmonic mean computed over dim(s) in dimension """ inarray = inarray.astype(N.float_) if dimension == None: inarray = N.ravel(inarray) size = len(inarray) s = N.add.reduce(1.0 / inarray) elif type(dimension) in [IntType,FloatType]: size = float(inarray.shape[dimension]) s = N.add.reduce(1.0/inarray, dimension) if keepdims == 1: shp = list(inarray.shape) shp[dimension] = 1 s = N.reshape(s,shp) else: # must be a SEQUENCE of dims to average over dims = list(dimension) dims.sort() nondims = [] for i in range(len(inarray.shape)): if i not in dims: nondims.append(i) tinarray = N.transpose(inarray,nondims+dims) # put keep-dims first idx = [0] *len(nondims) if idx == []: size = len(N.ravel(inarray)) s = asum(1.0 / inarray) if keepdims == 1: s = N.reshape([s],N.ones(len(inarray.shape))) else: idx[0] = -1 loopcap = N.array(tinarray.shape[0:len(nondims)]) -1 s = N.zeros(loopcap+1,N.float_) while incr(idx,loopcap) <> -1: s[idx] = asum(1.0/tinarray[idx]) size = N.multiply.reduce(N.take(inarray.shape,dims)) if keepdims == 1: shp = list(inarray.shape) for dim in dims: shp[dim] = 1 s = N.reshape(s,shp) return size / s def amean (inarray,dimension=None,keepdims=0): """ Calculates the arithmatic mean of the values in the passed array. That is: 1/n * (x1 + x2 + ... + xn). Defaults to ALL values in the passed array. Use dimension=None to flatten array first. REMEMBER: if dimension=0, it collapses over dimension 0 ('rows' in a 2D array) only, and if dimension is a sequence, it collapses over all specified dimensions. If keepdims is set to 1, the resulting array will have as many dimensions as inarray, with only 1 'level' per dim that was collapsed over. Usage: amean(inarray,dimension=None,keepdims=0) Returns: arithematic mean calculated over dim(s) in dimension """ if inarray.dtype in [N.int_, N.short,N.ubyte]: inarray = inarray.astype(N.float_) if dimension == None: inarray = N.ravel(inarray) sum = N.add.reduce(inarray) denom = float(len(inarray)) elif type(dimension) in [IntType,FloatType]: sum = asum(inarray,dimension) denom = float(inarray.shape[dimension]) if keepdims == 1: shp = list(inarray.shape) shp[dimension] = 1 sum = N.reshape(sum,shp) else: # must be a TUPLE of dims to average over dims = list(dimension) dims.sort() dims.reverse() sum = inarray *1.0 for dim in dims: sum = N.add.reduce(sum,dim) denom = N.array(N.multiply.reduce(N.take(inarray.shape,dims)),N.float_) if keepdims == 1: shp = list(inarray.shape) for dim in dims: shp[dim] = 1 sum = N.reshape(sum,shp) return sum/denom def amedian (inarray,numbins=1000): """ Calculates the COMPUTED median value of an array of numbers, given the number of bins to use for the histogram (more bins approaches finding the precise median value of the array; default number of bins = 1000). From G.W. Heiman's Basic Stats, or CRC Probability & Statistics. NOTE: THIS ROUTINE ALWAYS uses the entire passed array (flattens it first). Usage: amedian(inarray,numbins=1000) Returns: median calculated over ALL values in inarray """ inarray = N.ravel(inarray) (hist, smallest, binsize, extras) = ahistogram(inarray,numbins,[min(inarray),max(inarray)]) cumhist = N.cumsum(hist) # make cumulative histogram otherbins = N.greater_equal(cumhist,len(inarray)/2.0) otherbins = list(otherbins) # list of 0/1s, 1s start at median bin cfbin = otherbins.index(1) # get 1st(!) index holding 50%ile score LRL = smallest + binsize*cfbin # get lower read limit of that bin cfbelow = N.add.reduce(hist[0:cfbin]) # cum. freq. below bin freq = hist[cfbin] # frequency IN the 50%ile bin median = LRL + ((len(inarray)/2.0-cfbelow)/float(freq))*binsize # MEDIAN return median def amedianscore (inarray,dimension=None): """ Returns the 'middle' score of the passed array. If there is an even number of scores, the mean of the 2 middle scores is returned. Can function with 1D arrays, or on the FIRST dimension of 2D arrays (i.e., dimension can be None, to pre-flatten the array, or else dimension must equal 0). Usage: amedianscore(inarray,dimension=None) Returns: 'middle' score of the array, or the mean of the 2 middle scores """ if dimension == None: inarray = N.ravel(inarray) dimension = 0 inarray = N.sort(inarray,dimension) if inarray.shape[dimension] % 2 == 0: # if even number of elements indx = inarray.shape[dimension]/2 # integer division correct median = N.asarray(inarray[indx]+inarray[indx-1]) / 2.0 else: indx = inarray.shape[dimension] / 2 # integer division correct median = N.take(inarray,[indx],dimension) if median.shape == (1,): median = median[0] return median def amode(a, dimension=None): """ Returns an array of the modal (most common) score in the passed array. If there is more than one such score, ONLY THE FIRST is returned. The bin-count for the modal values is also returned. Operates on whole array (dimension=None), or on a given dimension. Usage: amode(a, dimension=None) Returns: array of bin-counts for mode(s), array of corresponding modal values """ if dimension == None: a = N.ravel(a) dimension = 0 scores = pstats.aunique(N.ravel(a)) # get ALL unique values testshape = list(a.shape) testshape[dimension] = 1 oldmostfreq = N.zeros(testshape) oldcounts = N.zeros(testshape) for score in scores: template = N.equal(a,score) counts = asum(template,dimension,1) mostfrequent = N.where(counts>oldcounts,score,oldmostfreq) oldcounts = N.where(counts>oldcounts,counts,oldcounts) oldmostfreq = mostfrequent return oldcounts, mostfrequent def atmean(a,limits=None,inclusive=(1,1)): """ Returns the arithmetic mean of all values in an array, ignoring values strictly outside the sequence passed to 'limits'. Note: either limit in the sequence, or the value of limits itself, can be set to None. The inclusive list/tuple determines whether the lower and upper limiting bounds (respectively) are open/exclusive (0) or closed/inclusive (1). Usage: atmean(a,limits=None,inclusive=(1,1)) """ if a.dtype in [N.int_, N.short,N.ubyte]: a = a.astype(N.float_) if limits == None: return mean(a) assert type(limits) in [ListType,TupleType,N.ndarray], "Wrong type for limits in atmean" if inclusive[0]: lowerfcn = N.greater_equal else: lowerfcn = N.greater if inclusive[1]: upperfcn = N.less_equal else: upperfcn = N.less if limits[0] > N.maximum.reduce(N.ravel(a)) or limits[1] < N.minimum.reduce(N.ravel(a)): raise ValueError, "No array values within given limits (atmean)." elif limits[0]==None and limits[1]<>None: mask = upperfcn(a,limits[1]) elif limits[0]<>None and limits[1]==None: mask = lowerfcn(a,limits[0]) elif limits[0]<>None and limits[1]<>None: mask = lowerfcn(a,limits[0])*upperfcn(a,limits[1]) s = float(N.add.reduce(N.ravel(a*mask))) n = float(N.add.reduce(N.ravel(mask))) return s/n def atvar(a,limits=None,inclusive=(1,1)): """ Returns the sample variance of values in an array, (i.e., using N-1), ignoring values strictly outside the sequence passed to 'limits'. Note: either limit in the sequence, or the value of limits itself, can be set to None. The inclusive list/tuple determines whether the lower and upper limiting bounds (respectively) are open/exclusive (0) or closed/inclusive (1). ASSUMES A FLAT ARRAY (OR ELSE PREFLATTENS). Usage: atvar(a,limits=None,inclusive=(1,1)) """ a = a.astype(N.float_) if limits == None or limits == [None,None]: return avar(a) assert type(limits) in [ListType,TupleType,N.ndarray], "Wrong type for limits in atvar" if inclusive[0]: lowerfcn = N.greater_equal else: lowerfcn = N.greater if inclusive[1]: upperfcn = N.less_equal else: upperfcn = N.less if limits[0] > N.maximum.reduce(N.ravel(a)) or limits[1] < N.minimum.reduce(N.ravel(a)): raise ValueError, "No array values within given limits (atvar)." elif limits[0]==None and limits[1]<>None: mask = upperfcn(a,limits[1]) elif limits[0]<>None and limits[1]==None: mask = lowerfcn(a,limits[0]) elif limits[0]<>None and limits[1]<>None: mask = lowerfcn(a,limits[0])*upperfcn(a,limits[1]) a = N.compress(mask,a) # squish out excluded values return avar(a) def atmin(a,lowerlimit=None,dimension=None,inclusive=1): """ Returns the minimum value of a, along dimension, including only values less than (or equal to, if inclusive=1) lowerlimit. If the limit is set to None, all values in the array are used. Usage: atmin(a,lowerlimit=None,dimension=None,inclusive=1) """ if inclusive: lowerfcn = N.greater else: lowerfcn = N.greater_equal if dimension == None: a = N.ravel(a) dimension = 0 if lowerlimit == None: lowerlimit = N.minimum.reduce(N.ravel(a))-11 biggest = N.maximum.reduce(N.ravel(a)) ta = N.where(lowerfcn(a,lowerlimit),a,biggest) return N.minimum.reduce(ta,dimension) def atmax(a,upperlimit,dimension=None,inclusive=1): """ Returns the maximum value of a, along dimension, including only values greater than (or equal to, if inclusive=1) upperlimit. If the limit is set to None, a limit larger than the max value in the array is used. Usage: atmax(a,upperlimit,dimension=None,inclusive=1) """ if inclusive: upperfcn = N.less else: upperfcn = N.less_equal if dimension == None: a = N.ravel(a) dimension = 0 if upperlimit == None: upperlimit = N.maximum.reduce(N.ravel(a))+1 smallest = N.minimum.reduce(N.ravel(a)) ta = N.where(upperfcn(a,upperlimit),a,smallest) return N.maximum.reduce(ta,dimension) def atstdev(a,limits=None,inclusive=(1,1)): """ Returns the standard deviation of all values in an array, ignoring values strictly outside the sequence passed to 'limits'. Note: either limit in the sequence, or the value of limits itself, can be set to None. The inclusive list/tuple determines whether the lower and upper limiting bounds (respectively) are open/exclusive (0) or closed/inclusive (1). Usage: atstdev(a,limits=None,inclusive=(1,1)) """ return N.sqrt(tvar(a,limits,inclusive)) def atsem(a,limits=None,inclusive=(1,1)): """ Returns the standard error of the mean for the values in an array, (i.e., using N for the denominator), ignoring values strictly outside the sequence passed to 'limits'. Note: either limit in the sequence, or the value of limits itself, can be set to None. The inclusive list/tuple determines whether the lower and upper limiting bounds (respectively) are open/exclusive (0) or closed/inclusive (1). Usage: atsem(a,limits=None,inclusive=(1,1)) """ sd = tstdev(a,limits,inclusive) if limits == None or limits == [None,None]: n = float(len(N.ravel(a))) limits = [min(a)-1, max(a)+1] assert type(limits) in [ListType,TupleType,N.ndarray], "Wrong type for limits in atsem" if inclusive[0]: lowerfcn = N.greater_equal else: lowerfcn = N.greater if inclusive[1]: upperfcn = N.less_equal else: upperfcn = N.less if limits[0] > N.maximum.reduce(N.ravel(a)) or limits[1] < N.minimum.reduce(N.ravel(a)): raise ValueError, "No array values within given limits (atsem)." elif limits[0]==None and limits[1]<>None: mask = upperfcn(a,limits[1]) elif limits[0]<>None and limits[1]==None: mask = lowerfcn(a,limits[0]) elif limits[0]<>None and limits[1]<>None: mask = lowerfcn(a,limits[0])*upperfcn(a,limits[1]) term1 = N.add.reduce(N.ravel(a*a*mask)) n = float(N.add.reduce(N.ravel(mask))) return sd/math.sqrt(n) ##################################### ############ AMOMENTS ############# ##################################### def amoment(a,moment=1,dimension=None): """ Calculates the nth moment about the mean for a sample (defaults to the 1st moment). Generally used to calculate coefficients of skewness and kurtosis. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Usage: amoment(a,moment=1,dimension=None) Returns: appropriate moment along given dimension """ if dimension == None: a = N.ravel(a) dimension = 0 if moment == 1: return 0.0 else: mn = amean(a,dimension,1) # 1=keepdims s = N.power((a-mn),moment) return amean(s,dimension) def avariation(a,dimension=None): """ Returns the coefficient of variation, as defined in CRC Standard Probability and Statistics, p.6. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Usage: avariation(a,dimension=None) """ return 100.0*asamplestdev(a,dimension)/amean(a,dimension) def askew(a,dimension=None): """ Returns the skewness of a distribution (normal ==> 0.0; >0 means extra weight in left tail). Use askewtest() to see if it's close enough. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Usage: askew(a, dimension=None) Returns: skew of vals in a along dimension, returning ZERO where all vals equal """ denom = N.power(amoment(a,2,dimension),1.5) zero = N.equal(denom,0) if type(denom) == N.ndarray and asum(zero) <> 0: print "Number of zeros in askew: ",asum(zero) denom = denom + zero # prevent divide-by-zero return N.where(zero, 0, amoment(a,3,dimension)/denom) def akurtosis(a,dimension=None): """ Returns the kurtosis of a distribution (normal ==> 3.0; >3 means heavier in the tails, and usually more peaked). Use akurtosistest() to see if it's close enough. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Usage: akurtosis(a,dimension=None) Returns: kurtosis of values in a along dimension, and ZERO where all vals equal """ denom = N.power(amoment(a,2,dimension),2) zero = N.equal(denom,0) if type(denom) == N.ndarray and asum(zero) <> 0: print "Number of zeros in akurtosis: ",asum(zero) denom = denom + zero # prevent divide-by-zero return N.where(zero,0,amoment(a,4,dimension)/denom) def adescribe(inarray,dimension=None): """ Returns several descriptive statistics of the passed array. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Usage: adescribe(inarray,dimension=None) Returns: n, (min,max), mean, standard deviation, skew, kurtosis """ if dimension == None: inarray = N.ravel(inarray) dimension = 0 n = inarray.shape[dimension] mm = (N.minimum.reduce(inarray),N.maximum.reduce(inarray)) m = amean(inarray,dimension) sd = astdev(inarray,dimension) skew = askew(inarray,dimension) kurt = akurtosis(inarray,dimension) return n, mm, m, sd, skew, kurt ##################################### ######## NORMALITY TESTS ########## ##################################### def askewtest(a,dimension=None): """ Tests whether the skew is significantly different from a normal distribution. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Usage: askewtest(a,dimension=None) Returns: z-score and 2-tail z-probability """ if dimension == None: a = N.ravel(a) dimension = 0 b2 = askew(a,dimension) n = float(a.shape[dimension]) y = b2 * N.sqrt(((n+1)*(n+3)) / (6.0*(n-2)) ) beta2 = ( 3.0*(n*n+27*n-70)*(n+1)*(n+3) ) / ( (n-2.0)*(n+5)*(n+7)*(n+9) ) W2 = -1 + N.sqrt(2*(beta2-1)) delta = 1/N.sqrt(N.log(N.sqrt(W2))) alpha = N.sqrt(2/(W2-1)) y = N.where(y==0,1,y) Z = delta*N.log(y/alpha + N.sqrt((y/alpha)**2+1)) return Z, (1.0-zprob(Z))*2 def akurtosistest(a,dimension=None): """ Tests whether a dataset has normal kurtosis (i.e., kurtosis=3(n-1)/(n+1)) Valid only for n>20. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Usage: akurtosistest(a,dimension=None) Returns: z-score and 2-tail z-probability, returns 0 for bad pixels """ if dimension == None: a = N.ravel(a) dimension = 0 n = float(a.shape[dimension]) if n<20: print "akurtosistest only valid for n>=20 ... continuing anyway, n=",n b2 = akurtosis(a,dimension) E = 3.0*(n-1) /(n+1) varb2 = 24.0*n*(n-2)*(n-3) / ((n+1)*(n+1)*(n+3)*(n+5)) x = (b2-E)/N.sqrt(varb2) sqrtbeta1 = 6.0*(n*n-5*n+2)/((n+7)*(n+9)) * N.sqrt((6.0*(n+3)*(n+5))/ (n*(n-2)*(n-3))) A = 6.0 + 8.0/sqrtbeta1 *(2.0/sqrtbeta1 + N.sqrt(1+4.0/(sqrtbeta1**2))) term1 = 1 -2/(9.0*A) denom = 1 +x*N.sqrt(2/(A-4.0)) denom = N.where(N.less(denom,0), 99, denom) term2 = N.where(N.equal(denom,0), term1, N.power((1-2.0/A)/denom,1/3.0)) Z = ( term1 - term2 ) / N.sqrt(2/(9.0*A)) Z = N.where(N.equal(denom,99), 0, Z) return Z, (1.0-zprob(Z))*2 def anormaltest(a,dimension=None): """ Tests whether skew and/OR kurtosis of dataset differs from normal curve. Can operate over multiple dimensions. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Usage: anormaltest(a,dimension=None) Returns: z-score and 2-tail probability """ if dimension == None: a = N.ravel(a) dimension = 0 s,p = askewtest(a,dimension) k,p = akurtosistest(a,dimension) k2 = N.power(s,2) + N.power(k,2) return k2, achisqprob(k2,2) ##################################### ###### AFREQUENCY FUNCTIONS ####### ##################################### def aitemfreq(a): """ Returns a 2D array of item frequencies. Column 1 contains item values, column 2 contains their respective counts. Assumes a 1D array is passed. @@@sorting OK? Usage: aitemfreq(a) Returns: a 2D frequency table (col [0:n-1]=scores, col n=frequencies) """ scores = pstats.aunique(a) scores = N.sort(scores) freq = N.zeros(len(scores)) for i in range(len(scores)): freq[i] = N.add.reduce(N.equal(a,scores[i])) return N.array(pstats.aabut(scores, freq)) def ascoreatpercentile (inarray, percent): """ Usage: ascoreatpercentile(inarray,percent) 0= targetcf: break score = binsize * ((targetcf - cumhist[i-1]) / float(h[i])) + (lrl+binsize*i) return score def apercentileofscore (inarray,score,histbins=10,defaultlimits=None): """ Note: result of this function depends on the values used to histogram the data(!). Usage: apercentileofscore(inarray,score,histbins=10,defaultlimits=None) Returns: percentile-position of score (0-100) relative to inarray """ h, lrl, binsize, extras = histogram(inarray,histbins,defaultlimits) cumhist = cumsum(h*1) i = int((score - lrl)/float(binsize)) pct = (cumhist[i-1]+((score-(lrl+binsize*i))/float(binsize))*h[i])/float(len(inarray)) * 100 return pct def ahistogram (inarray,numbins=10,defaultlimits=None,printextras=1): """ Returns (i) an array of histogram bin counts, (ii) the smallest value of the histogram binning, and (iii) the bin width (the last 2 are not necessarily integers). Default number of bins is 10. Defaultlimits can be None (the routine picks bins spanning all the numbers in the inarray) or a 2-sequence (lowerlimit, upperlimit). Returns all of the following: array of bin values, lowerreallimit, binsize, extrapoints. Usage: ahistogram(inarray,numbins=10,defaultlimits=None,printextras=1) Returns: (array of bin counts, bin-minimum, min-width, #-points-outside-range) """ inarray = N.ravel(inarray) # flatten any >1D arrays if (defaultlimits <> None): lowerreallimit = defaultlimits[0] upperreallimit = defaultlimits[1] binsize = (upperreallimit-lowerreallimit) / float(numbins) else: Min = N.minimum.reduce(inarray) Max = N.maximum.reduce(inarray) estbinwidth = float(Max - Min)/float(numbins) + 1e-6 binsize = (Max-Min+estbinwidth)/float(numbins) lowerreallimit = Min - binsize/2.0 #lower real limit,1st bin bins = N.zeros(numbins) extrapoints = 0 for num in inarray: try: if (num-lowerreallimit) < 0: extrapoints = extrapoints + 1 else: bintoincrement = int((num-lowerreallimit) / float(binsize)) bins[bintoincrement] = bins[bintoincrement] + 1 except: # point outside lower/upper limits extrapoints = extrapoints + 1 if (extrapoints > 0 and printextras == 1): print '\nPoints outside given histogram range =',extrapoints return (bins, lowerreallimit, binsize, extrapoints) def acumfreq(a,numbins=10,defaultreallimits=None): """ Returns a cumulative frequency histogram, using the histogram function. Defaultreallimits can be None (use all data), or a 2-sequence containing lower and upper limits on values to include. Usage: acumfreq(a,numbins=10,defaultreallimits=None) Returns: array of cumfreq bin values, lowerreallimit, binsize, extrapoints """ h,l,b,e = histogram(a,numbins,defaultreallimits) cumhist = cumsum(h*1) return cumhist,l,b,e def arelfreq(a,numbins=10,defaultreallimits=None): """ Returns a relative frequency histogram, using the histogram function. Defaultreallimits can be None (use all data), or a 2-sequence containing lower and upper limits on values to include. Usage: arelfreq(a,numbins=10,defaultreallimits=None) Returns: array of cumfreq bin values, lowerreallimit, binsize, extrapoints """ h,l,b,e = histogram(a,numbins,defaultreallimits) h = N.array(h/float(a.shape[0])) return h,l,b,e ##################################### ###### AVARIABILITY FUNCTIONS ##### ##################################### def aobrientransform(*args): """ Computes a transform on input data (any number of columns). Used to test for homogeneity of variance prior to running one-way stats. Each array in *args is one level of a factor. If an F_oneway() run on the transformed data and found significant, variances are unequal. From Maxwell and Delaney, p.112. Usage: aobrientransform(*args) *args = 1D arrays, one per level of factor Returns: transformed data for use in an ANOVA """ TINY = 1e-10 k = len(args) n = N.zeros(k,N.float_) v = N.zeros(k,N.float_) m = N.zeros(k,N.float_) nargs = [] for i in range(k): nargs.append(args[i].astype(N.float_)) n[i] = float(len(nargs[i])) v[i] = var(nargs[i]) m[i] = mean(nargs[i]) for j in range(k): for i in range(n[j]): t1 = (n[j]-1.5)*n[j]*(nargs[j][i]-m[j])**2 t2 = 0.5*v[j]*(n[j]-1.0) t3 = (n[j]-1.0)*(n[j]-2.0) nargs[j][i] = (t1-t2) / float(t3) check = 1 for j in range(k): if v[j] - mean(nargs[j]) > TINY: check = 0 if check <> 1: raise ValueError, 'Lack of convergence in obrientransform.' else: return N.array(nargs) def asamplevar (inarray,dimension=None,keepdims=0): """ Returns the sample standard deviation of the values in the passed array (i.e., using N). Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Set keepdims=1 to return an array with the same number of dimensions as inarray. Usage: asamplevar(inarray,dimension=None,keepdims=0) """ if dimension == None: inarray = N.ravel(inarray) dimension = 0 if dimension == 1: mn = amean(inarray,dimension)[:,N.NewAxis] else: mn = amean(inarray,dimension,keepdims=1) deviations = inarray - mn if type(dimension) == ListType: n = 1 for d in dimension: n = n*inarray.shape[d] else: n = inarray.shape[dimension] svar = ass(deviations,dimension,keepdims) / float(n) return svar def asamplestdev (inarray, dimension=None, keepdims=0): """ Returns the sample standard deviation of the values in the passed array (i.e., using N). Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Set keepdims=1 to return an array with the same number of dimensions as inarray. Usage: asamplestdev(inarray,dimension=None,keepdims=0) """ return N.sqrt(asamplevar(inarray,dimension,keepdims)) def asignaltonoise(instack,dimension=0): """ Calculates signal-to-noise. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Usage: asignaltonoise(instack,dimension=0): Returns: array containing the value of (mean/stdev) along dimension, or 0 when stdev=0 """ m = mean(instack,dimension) sd = stdev(instack,dimension) return N.where(sd==0,0,m/sd) def acov (x,y, dimension=None,keepdims=0): """ Returns the estimated covariance of the values in the passed array (i.e., N-1). Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Set keepdims=1 to return an array with the same number of dimensions as inarray. Usage: acov(x,y,dimension=None,keepdims=0) """ if dimension == None: x = N.ravel(x) y = N.ravel(y) dimension = 0 xmn = amean(x,dimension,1) # keepdims xdeviations = x - xmn ymn = amean(y,dimension,1) # keepdims ydeviations = y - ymn if type(dimension) == ListType: n = 1 for d in dimension: n = n*x.shape[d] else: n = x.shape[dimension] covar = N.sum(xdeviations*ydeviations)/float(n-1) return covar def avar (inarray, dimension=None,keepdims=0): """ Returns the estimated population variance of the values in the passed array (i.e., N-1). Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Set keepdims=1 to return an array with the same number of dimensions as inarray. Usage: avar(inarray,dimension=None,keepdims=0) """ if dimension == None: inarray = N.ravel(inarray) dimension = 0 mn = amean(inarray,dimension,1) deviations = inarray - mn if type(dimension) == ListType: n = 1 for d in dimension: n = n*inarray.shape[d] else: n = inarray.shape[dimension] var = ass(deviations,dimension,keepdims)/float(n-1) return var def astdev (inarray, dimension=None, keepdims=0): """ Returns the estimated population standard deviation of the values in the passed array (i.e., N-1). Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Set keepdims=1 to return an array with the same number of dimensions as inarray. Usage: astdev(inarray,dimension=None,keepdims=0) """ return N.sqrt(avar(inarray,dimension,keepdims)) def asterr (inarray, dimension=None, keepdims=0): """ Returns the estimated population standard error of the values in the passed array (i.e., N-1). Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Set keepdims=1 to return an array with the same number of dimensions as inarray. Usage: asterr(inarray,dimension=None,keepdims=0) """ if dimension == None: inarray = N.ravel(inarray) dimension = 0 return astdev(inarray,dimension,keepdims) / float(N.sqrt(inarray.shape[dimension])) def asem (inarray, dimension=None, keepdims=0): """ Returns the standard error of the mean (i.e., using N) of the values in the passed array. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Set keepdims=1 to return an array with the same number of dimensions as inarray. Usage: asem(inarray,dimension=None, keepdims=0) """ if dimension == None: inarray = N.ravel(inarray) dimension = 0 if type(dimension) == ListType: n = 1 for d in dimension: n = n*inarray.shape[d] else: n = inarray.shape[dimension] s = asamplestdev(inarray,dimension,keepdims) / N.sqrt(n-1) return s def az (a, score): """ Returns the z-score of a given input score, given thearray from which that score came. Not appropriate for population calculations, nor for arrays > 1D. Usage: az(a, score) """ z = (score-amean(a)) / asamplestdev(a) return z def azs (a): """ Returns a 1D array of z-scores, one for each score in the passed array, computed relative to the passed array. Usage: azs(a) """ zscores = [] for item in a: zscores.append(z(a,item)) return N.array(zscores) def azmap (scores, compare, dimension=0): """ Returns an array of z-scores the shape of scores (e.g., [x,y]), compared to array passed to compare (e.g., [time,x,y]). Assumes collapsing over dim 0 of the compare array. Usage: azs(scores, compare, dimension=0) """ mns = amean(compare,dimension) sstd = asamplestdev(compare,0) return (scores - mns) / sstd ##################################### ####### ATRIMMING FUNCTIONS ####### ##################################### ## deleted around() as it's in numpy now def athreshold(a,threshmin=None,threshmax=None,newval=0): """ Like Numeric.clip() except that values threshmax are replaced by newval instead of by threshmin/threshmax (respectively). Usage: athreshold(a,threshmin=None,threshmax=None,newval=0) Returns: a, with values threshmax replaced with newval """ mask = N.zeros(a.shape) if threshmin <> None: mask = mask + N.where(a None: mask = mask + N.where(a>threshmax,1,0) mask = N.clip(mask,0,1) return N.where(mask,newval,a) def atrimboth (a,proportiontocut): """ Slices off the passed proportion of items from BOTH ends of the passed array (i.e., with proportiontocut=0.1, slices 'leftmost' 10% AND 'rightmost' 10% of scores. You must pre-sort the array if you want "proper" trimming. Slices off LESS if proportion results in a non-integer slice index (i.e., conservatively slices off proportiontocut). Usage: atrimboth (a,proportiontocut) Returns: trimmed version of array a """ lowercut = int(proportiontocut*len(a)) uppercut = len(a) - lowercut return a[lowercut:uppercut] def atrim1 (a,proportiontocut,tail='right'): """ Slices off the passed proportion of items from ONE end of the passed array (i.e., if proportiontocut=0.1, slices off 'leftmost' or 'rightmost' 10% of scores). Slices off LESS if proportion results in a non-integer slice index (i.e., conservatively slices off proportiontocut). Usage: atrim1(a,proportiontocut,tail='right') or set tail='left' Returns: trimmed version of array a """ if string.lower(tail) == 'right': lowercut = 0 uppercut = len(a) - int(proportiontocut*len(a)) elif string.lower(tail) == 'left': lowercut = int(proportiontocut*len(a)) uppercut = len(a) return a[lowercut:uppercut] ##################################### ##### ACORRELATION FUNCTIONS ###### ##################################### def acovariance(X): """ Computes the covariance matrix of a matrix X. Requires a 2D matrix input. Usage: acovariance(X) Returns: covariance matrix of X """ if len(X.shape) <> 2: raise TypeError, "acovariance requires 2D matrices" n = X.shape[0] mX = amean(X,0) return N.dot(N.transpose(X),X) / float(n) - N.multiply.outer(mX,mX) def acorrelation(X): """ Computes the correlation matrix of a matrix X. Requires a 2D matrix input. Usage: acorrelation(X) Returns: correlation matrix of X """ C = acovariance(X) V = N.diagonal(C) return C / N.sqrt(N.multiply.outer(V,V)) def apaired(x,y): """ Interactively determines the type of data in x and y, and then runs the appropriated statistic for paired group data. Usage: apaired(x,y) x,y = the two arrays of values to be compared Returns: appropriate statistic name, value, and probability """ samples = '' while samples not in ['i','r','I','R','c','C']: print '\nIndependent or related samples, or correlation (i,r,c): ', samples = raw_input() if samples in ['i','I','r','R']: print '\nComparing variances ...', # USE O'BRIEN'S TEST FOR HOMOGENEITY OF VARIANCE, Maxwell & delaney, p.112 r = obrientransform(x,y) f,p = F_oneway(pstats.colex(r,0),pstats.colex(r,1)) if p<0.05: vartype='unequal, p='+str(round(p,4)) else: vartype='equal' print vartype if samples in ['i','I']: if vartype[0]=='e': t,p = ttest_ind(x,y,None,0) print '\nIndependent samples t-test: ', round(t,4),round(p,4) else: if len(x)>20 or len(y)>20: z,p = ranksums(x,y) print '\nRank Sums test (NONparametric, n>20): ', round(z,4),round(p,4) else: u,p = mannwhitneyu(x,y) print '\nMann-Whitney U-test (NONparametric, ns<20): ', round(u,4),round(p,4) else: # RELATED SAMPLES if vartype[0]=='e': t,p = ttest_rel(x,y,0) print '\nRelated samples t-test: ', round(t,4),round(p,4) else: t,p = ranksums(x,y) print '\nWilcoxon T-test (NONparametric): ', round(t,4),round(p,4) else: # CORRELATION ANALYSIS corrtype = '' while corrtype not in ['c','C','r','R','d','D']: print '\nIs the data Continuous, Ranked, or Dichotomous (c,r,d): ', corrtype = raw_input() if corrtype in ['c','C']: m,b,r,p,see = linregress(x,y) print '\nLinear regression for continuous variables ...' lol = [['Slope','Intercept','r','Prob','SEestimate'],[round(m,4),round(b,4),round(r,4),round(p,4),round(see,4)]] pstats.printcc(lol) elif corrtype in ['r','R']: r,p = spearmanr(x,y) print '\nCorrelation for ranked variables ...' print "Spearman's r: ",round(r,4),round(p,4) else: # DICHOTOMOUS r,p = pointbiserialr(x,y) print '\nAssuming x contains a dichotomous variable ...' print 'Point Biserial r: ',round(r,4),round(p,4) print '\n\n' return None def dices(x,y): """ Calculates Dice's coefficient ... (2*number of common terms)/(number of terms in x + number of terms in y). Returns a value between 0 (orthogonal) and 1. Usage: dices(x,y) """ import sets x = sets.Set(x) y = sets.Set(y) common = len(x.intersection(y)) total = float(len(x) + len(y)) return 2*common/total def icc(x,y=None,verbose=0): """ Calculates intraclass correlation coefficients using simple, Type I sums of squares. If only one variable is passed, assumed it's an Nx2 matrix Usage: icc(x,y=None,verbose=0) Returns: icc rho, prob ####PROB IS A GUESS BASED ON PEARSON """ TINY = 1.0e-20 if y: all = N.concatenate([x,y],0) else: all = x+0 x = all[:,0] y = all[:,1] totalss = ass(all-mean(all)) pairmeans = (x+y)/2. withinss = ass(x-pairmeans) + ass(y-pairmeans) withindf = float(len(x)) betwdf = float(len(x)-1) withinms = withinss / withindf betweenms = (totalss-withinss) / betwdf rho = (betweenms-withinms)/(withinms+betweenms) t = rho*math.sqrt(betwdf/((1.0-rho+TINY)*(1.0+rho+TINY))) prob = abetai(0.5*betwdf,0.5,betwdf/(betwdf+t*t),verbose) return rho, prob def alincc(x,y): """ Calculates Lin's concordance correlation coefficient. Usage: alincc(x,y) where x, y are equal-length arrays Returns: Lin's CC """ x = N.ravel(x) y = N.ravel(y) covar = acov(x,y)*(len(x)-1)/float(len(x)) # correct denom to n xvar = avar(x)*(len(x)-1)/float(len(x)) # correct denom to n yvar = avar(y)*(len(y)-1)/float(len(y)) # correct denom to n lincc = (2 * covar) / ((xvar+yvar) +((amean(x)-amean(y))**2)) return lincc def apearsonr(x,y,verbose=1): """ Calculates a Pearson correlation coefficient and returns p. Taken from Heiman's Basic Statistics for the Behav. Sci (2nd), p.195. Usage: apearsonr(x,y,verbose=1) where x,y are equal length arrays Returns: Pearson's r, two-tailed p-value """ TINY = 1.0e-20 n = len(x) xmean = amean(x) ymean = amean(y) r_num = n*(N.add.reduce(x*y)) - N.add.reduce(x)*N.add.reduce(y) r_den = math.sqrt((n*ass(x) - asquare_of_sums(x))*(n*ass(y)-asquare_of_sums(y))) r = (r_num / r_den) df = n-2 t = r*math.sqrt(df/((1.0-r+TINY)*(1.0+r+TINY))) prob = abetai(0.5*df,0.5,df/(df+t*t),verbose) return r,prob def aspearmanr(x,y): """ Calculates a Spearman rank-order correlation coefficient. Taken from Heiman's Basic Statistics for the Behav. Sci (1st), p.192. Usage: aspearmanr(x,y) where x,y are equal-length arrays Returns: Spearman's r, two-tailed p-value """ TINY = 1e-30 n = len(x) rankx = rankdata(x) ranky = rankdata(y) dsq = N.add.reduce((rankx-ranky)**2) rs = 1 - 6*dsq / float(n*(n**2-1)) t = rs * math.sqrt((n-2) / ((rs+1.0)*(1.0-rs))) df = n-2 probrs = abetai(0.5*df,0.5,df/(df+t*t)) # probability values for rs are from part 2 of the spearman function in # Numerical Recipies, p.510. They close to tables, but not exact.(?) return rs, probrs def apointbiserialr(x,y): """ Calculates a point-biserial correlation coefficient and the associated probability value. Taken from Heiman's Basic Statistics for the Behav. Sci (1st), p.194. Usage: apointbiserialr(x,y) where x,y are equal length arrays Returns: Point-biserial r, two-tailed p-value """ TINY = 1e-30 categories = pstats.aunique(x) data = pstats.aabut(x,y) if len(categories) <> 2: raise ValueError, "Exactly 2 categories required (in x) for pointbiserialr()." else: # there are 2 categories, continue codemap = pstats.aabut(categories,N.arange(2)) recoded = pstats.arecode(data,codemap,0) x = pstats.alinexand(data,0,categories[0]) y = pstats.alinexand(data,0,categories[1]) xmean = amean(pstats.acolex(x,1)) ymean = amean(pstats.acolex(y,1)) n = len(data) adjust = math.sqrt((len(x)/float(n))*(len(y)/float(n))) rpb = (ymean - xmean)/asamplestdev(pstats.acolex(data,1))*adjust df = n-2 t = rpb*math.sqrt(df/((1.0-rpb+TINY)*(1.0+rpb+TINY))) prob = abetai(0.5*df,0.5,df/(df+t*t)) return rpb, prob def akendalltau(x,y): """ Calculates Kendall's tau ... correlation of ordinal data. Adapted from function kendl1 in Numerical Recipies. Needs good test-cases.@@@ Usage: akendalltau(x,y) Returns: Kendall's tau, two-tailed p-value """ n1 = 0 n2 = 0 iss = 0 for j in range(len(x)-1): for k in range(j,len(y)): a1 = x[j] - x[k] a2 = y[j] - y[k] aa = a1 * a2 if (aa): # neither array has a tie n1 = n1 + 1 n2 = n2 + 1 if aa > 0: iss = iss + 1 else: iss = iss -1 else: if (a1): n1 = n1 + 1 else: n2 = n2 + 1 tau = iss / math.sqrt(n1*n2) svar = (4.0*len(x)+10.0) / (9.0*len(x)*(len(x)-1)) z = tau / math.sqrt(svar) prob = erfcc(abs(z)/1.4142136) return tau, prob def alinregress(*args): """ Calculates a regression line on two arrays, x and y, corresponding to x,y pairs. If a single 2D array is passed, alinregress finds dim with 2 levels and splits data into x,y pairs along that dim. Usage: alinregress(*args) args=2 equal-length arrays, or one 2D array Returns: slope, intercept, r, two-tailed prob, sterr-of-the-estimate, n """ TINY = 1.0e-20 if len(args) == 1: # more than 1D array? args = args[0] if len(args) == 2: x = args[0] y = args[1] else: x = args[:,0] y = args[:,1] else: x = args[0] y = args[1] n = len(x) xmean = amean(x) ymean = amean(y) r_num = n*(N.add.reduce(x*y)) - N.add.reduce(x)*N.add.reduce(y) r_den = math.sqrt((n*ass(x) - asquare_of_sums(x))*(n*ass(y)-asquare_of_sums(y))) r = r_num / r_den z = 0.5*math.log((1.0+r+TINY)/(1.0-r+TINY)) df = n-2 t = r*math.sqrt(df/((1.0-r+TINY)*(1.0+r+TINY))) prob = abetai(0.5*df,0.5,df/(df+t*t)) slope = r_num / (float(n)*ass(x) - asquare_of_sums(x)) intercept = ymean - slope*xmean sterrest = math.sqrt(1-r*r)*asamplestdev(y) return slope, intercept, r, prob, sterrest, n def amasslinregress(*args): """ Calculates a regression line on one 1D array (x) and one N-D array (y). Returns: slope, intercept, r, two-tailed prob, sterr-of-the-estimate, n """ TINY = 1.0e-20 if len(args) == 1: # more than 1D array? args = args[0] if len(args) == 2: x = N.ravel(args[0]) y = args[1] else: x = N.ravel(args[:,0]) y = args[:,1] else: x = args[0] y = args[1] x = x.astype(N.float_) y = y.astype(N.float_) n = len(x) xmean = amean(x) ymean = amean(y,0) shp = N.ones(len(y.shape)) shp[0] = len(x) x.shape = shp print x.shape, y.shape r_num = n*(N.add.reduce(x*y,0)) - N.add.reduce(x)*N.add.reduce(y,0) r_den = N.sqrt((n*ass(x) - asquare_of_sums(x))*(n*ass(y,0)-asquare_of_sums(y,0))) zerodivproblem = N.equal(r_den,0) r_den = N.where(zerodivproblem,1,r_den) # avoid zero-division in 1st place r = r_num / r_den # need to do this nicely for matrix division r = N.where(zerodivproblem,0.0,r) z = 0.5*N.log((1.0+r+TINY)/(1.0-r+TINY)) df = n-2 t = r*N.sqrt(df/((1.0-r+TINY)*(1.0+r+TINY))) prob = abetai(0.5*df,0.5,df/(df+t*t)) ss = float(n)*ass(x)-asquare_of_sums(x) s_den = N.where(ss==0,1,ss) # avoid zero-division in 1st place slope = r_num / s_den intercept = ymean - slope*xmean sterrest = N.sqrt(1-r*r)*asamplestdev(y,0) return slope, intercept, r, prob, sterrest, n ##################################### ##### AINFERENTIAL STATISTICS ##### ##################################### def attest_1samp(a,popmean,printit=0,name='Sample',writemode='a'): """ Calculates the t-obtained for the independent samples T-test on ONE group of scores a, given a population mean. If printit=1, results are printed to the screen. If printit='filename', the results are output to 'filename' using the given writemode (default=append). Returns t-value, and prob. Usage: attest_1samp(a,popmean,Name='Sample',printit=0,writemode='a') Returns: t-value, two-tailed prob """ if type(a) != N.ndarray: a = N.array(a) x = amean(a) v = avar(a) n = len(a) df = n-1 svar = ((n-1)*v) / float(df) t = (x-popmean)/math.sqrt(svar*(1.0/n)) prob = abetai(0.5*df,0.5,df/(df+t*t)) if printit <> 0: statname = 'Single-sample T-test.' outputpairedstats(printit,writemode, 'Population','--',popmean,0,0,0, name,n,x,v,N.minimum.reduce(N.ravel(a)), N.maximum.reduce(N.ravel(a)), statname,t,prob) return t,prob def attest_ind (a, b, dimension=None, printit=0, name1='Samp1', name2='Samp2',writemode='a'): """ Calculates the t-obtained T-test on TWO INDEPENDENT samples of scores a, and b. From Numerical Recipies, p.483. If printit=1, results are printed to the screen. If printit='filename', the results are output to 'filename' using the given writemode (default=append). Dimension can equal None (ravel array first), or an integer (the dimension over which to operate on a and b). Usage: attest_ind (a,b,dimension=None,printit=0, Name1='Samp1',Name2='Samp2',writemode='a') Returns: t-value, two-tailed p-value """ if dimension == None: a = N.ravel(a) b = N.ravel(b) dimension = 0 x1 = amean(a,dimension) x2 = amean(b,dimension) v1 = avar(a,dimension) v2 = avar(b,dimension) n1 = a.shape[dimension] n2 = b.shape[dimension] df = n1+n2-2 svar = ((n1-1)*v1+(n2-1)*v2) / float(df) zerodivproblem = N.equal(svar,0) svar = N.where(zerodivproblem,1,svar) # avoid zero-division in 1st place t = (x1-x2)/N.sqrt(svar*(1.0/n1 + 1.0/n2)) # N-D COMPUTATION HERE!!!!!! t = N.where(zerodivproblem,1.0,t) # replace NaN/wrong t-values with 1.0 probs = abetai(0.5*df,0.5,float(df)/(df+t*t)) if type(t) == N.ndarray: probs = N.reshape(probs,t.shape) if probs.shape == (1,): probs = probs[0] if printit <> 0: if type(t) == N.ndarray: t = t[0] if type(probs) == N.ndarray: probs = probs[0] statname = 'Independent samples T-test.' outputpairedstats(printit,writemode, name1,n1,x1,v1,N.minimum.reduce(N.ravel(a)), N.maximum.reduce(N.ravel(a)), name2,n2,x2,v2,N.minimum.reduce(N.ravel(b)), N.maximum.reduce(N.ravel(b)), statname,t,probs) return return t, probs def ap2t(pval,df): """ Tries to compute a t-value from a p-value (or pval array) and associated df. SLOW for large numbers of elements(!) as it re-computes p-values 20 times (smaller step-sizes) at which point it decides it's done. Keeps the signs of the input array. Returns 1000 (or -1000) if t>100. Usage: ap2t(pval,df) Returns: an array of t-values with the shape of pval """ pval = N.array(pval) signs = N.sign(pval) pval = abs(pval) t = N.ones(pval.shape,N.float_)*50 step = N.ones(pval.shape,N.float_)*25 print "Initial ap2t() prob calc" prob = abetai(0.5*df,0.5,float(df)/(df+t*t)) print 'ap2t() iter: ', for i in range(10): print i,' ', t = N.where(pval99.9,1000,t) # hit upper-boundary t = t+signs return t #, prob, pval def attest_rel (a,b,dimension=None,printit=0,name1='Samp1',name2='Samp2',writemode='a'): """ Calculates the t-obtained T-test on TWO RELATED samples of scores, a and b. From Numerical Recipies, p.483. If printit=1, results are printed to the screen. If printit='filename', the results are output to 'filename' using the given writemode (default=append). Dimension can equal None (ravel array first), or an integer (the dimension over which to operate on a and b). Usage: attest_rel(a,b,dimension=None,printit=0, name1='Samp1',name2='Samp2',writemode='a') Returns: t-value, two-tailed p-value """ if dimension == None: a = N.ravel(a) b = N.ravel(b) dimension = 0 if len(a)<>len(b): raise ValueError, 'Unequal length arrays.' x1 = amean(a,dimension) x2 = amean(b,dimension) v1 = avar(a,dimension) v2 = avar(b,dimension) n = a.shape[dimension] df = float(n-1) d = (a-b).astype('d') denom = N.sqrt((n*N.add.reduce(d*d,dimension) - N.add.reduce(d,dimension)**2) /df) zerodivproblem = N.equal(denom,0) denom = N.where(zerodivproblem,1,denom) # avoid zero-division in 1st place t = N.add.reduce(d,dimension) / denom # N-D COMPUTATION HERE!!!!!! t = N.where(zerodivproblem,1.0,t) # replace NaN/wrong t-values with 1.0 probs = abetai(0.5*df,0.5,float(df)/(df+t*t)) if type(t) == N.ndarray: probs = N.reshape(probs,t.shape) if probs.shape == (1,): probs = probs[0] if printit <> 0: statname = 'Related samples T-test.' outputpairedstats(printit,writemode, name1,n,x1,v1,N.minimum.reduce(N.ravel(a)), N.maximum.reduce(N.ravel(a)), name2,n,x2,v2,N.minimum.reduce(N.ravel(b)), N.maximum.reduce(N.ravel(b)), statname,t,probs) return return t, probs def achisquare(f_obs,f_exp=None): """ Calculates a one-way chi square for array of observed frequencies and returns the result. If no expected frequencies are given, the total N is assumed to be equally distributed across all groups. @@@NOT RIGHT?? Usage: achisquare(f_obs, f_exp=None) f_obs = array of observed cell freq. Returns: chisquare-statistic, associated p-value """ k = len(f_obs) if f_exp == None: f_exp = N.array([sum(f_obs)/float(k)] * len(f_obs),N.float_) f_exp = f_exp.astype(N.float_) chisq = N.add.reduce((f_obs-f_exp)**2 / f_exp) return chisq, achisqprob(chisq, k-1) def aks_2samp (data1,data2): """ Computes the Kolmogorov-Smirnof statistic on 2 samples. Modified from Numerical Recipies in C, page 493. Returns KS D-value, prob. Not ufunc- like. Usage: aks_2samp(data1,data2) where data1 and data2 are 1D arrays Returns: KS D-value, p-value """ j1 = 0 # N.zeros(data1.shape[1:]) TRIED TO MAKE THIS UFUNC-LIKE j2 = 0 # N.zeros(data2.shape[1:]) fn1 = 0.0 # N.zeros(data1.shape[1:],N.float_) fn2 = 0.0 # N.zeros(data2.shape[1:],N.float_) n1 = data1.shape[0] n2 = data2.shape[0] en1 = n1*1 en2 = n2*1 d = N.zeros(data1.shape[1:],N.float_) data1 = N.sort(data1,0) data2 = N.sort(data2,0) while j1 < n1 and j2 < n2: d1=data1[j1] d2=data2[j2] if d1 <= d2: fn1 = (j1)/float(en1) j1 = j1 + 1 if d2 <= d1: fn2 = (j2)/float(en2) j2 = j2 + 1 dt = (fn2-fn1) if abs(dt) > abs(d): d = dt # try: en = math.sqrt(en1*en2/float(en1+en2)) prob = aksprob((en+0.12+0.11/en)*N.fabs(d)) # except: # prob = 1.0 return d, prob def amannwhitneyu(x,y): """ Calculates a Mann-Whitney U statistic on the provided scores and returns the result. Use only when the n in each condition is < 20 and you have 2 independent samples of ranks. REMEMBER: Mann-Whitney U is significant if the u-obtained is LESS THAN or equal to the critical value of U. Usage: amannwhitneyu(x,y) where x,y are arrays of values for 2 conditions Returns: u-statistic, one-tailed p-value (i.e., p(z(U))) """ n1 = len(x) n2 = len(y) ranked = rankdata(N.concatenate((x,y))) rankx = ranked[0:n1] # get the x-ranks ranky = ranked[n1:] # the rest are y-ranks u1 = n1*n2 + (n1*(n1+1))/2.0 - sum(rankx) # calc U for x u2 = n1*n2 - u1 # remainder is U for y bigu = max(u1,u2) smallu = min(u1,u2) T = math.sqrt(tiecorrect(ranked)) # correction factor for tied scores if T == 0: raise ValueError, 'All numbers are identical in amannwhitneyu' sd = math.sqrt(T*n1*n2*(n1+n2+1)/12.0) z = abs((bigu-n1*n2/2.0) / sd) # normal approximation for prob calc return smallu, 1.0 - azprob(z) def atiecorrect(rankvals): """ Tie-corrector for ties in Mann Whitney U and Kruskal Wallis H tests. See Siegel, S. (1956) Nonparametric Statistics for the Behavioral Sciences. New York: McGraw-Hill. Code adapted from |Stat rankind.c code. Usage: atiecorrect(rankvals) Returns: T correction factor for U or H """ sorted,posn = ashellsort(N.array(rankvals)) n = len(sorted) T = 0.0 i = 0 while (i len(y): raise ValueError, 'Unequal N in awilcoxont. Aborting.' d = x-y d = N.compress(N.not_equal(d,0),d) # Keep all non-zero differences count = len(d) absd = abs(d) absranked = arankdata(absd) r_plus = 0.0 r_minus = 0.0 for i in range(len(absd)): if d[i] < 0: r_minus = r_minus + absranked[i] else: r_plus = r_plus + absranked[i] wt = min(r_plus, r_minus) mn = count * (count+1) * 0.25 se = math.sqrt(count*(count+1)*(2.0*count+1.0)/24.0) z = math.fabs(wt-mn) / se z = math.fabs(wt-mn) / se prob = 2*(1.0 -zprob(abs(z))) return wt, prob def akruskalwallish(*args): """ The Kruskal-Wallis H-test is a non-parametric ANOVA for 3 or more groups, requiring at least 5 subjects in each group. This function calculates the Kruskal-Wallis H and associated p-value for 3 or more independent samples. Usage: akruskalwallish(*args) args are separate arrays for 3+ conditions Returns: H-statistic (corrected for ties), associated p-value """ assert len(args) == 3, "Need at least 3 groups in stats.akruskalwallish()" args = list(args) n = [0]*len(args) n = map(len,args) all = [] for i in range(len(args)): all = all + args[i].tolist() ranked = rankdata(all) T = tiecorrect(ranked) for i in range(len(args)): args[i] = ranked[0:n[i]] del ranked[0:n[i]] rsums = [] for i in range(len(args)): rsums.append(sum(args[i])**2) rsums[i] = rsums[i] / float(n[i]) ssbn = sum(rsums) totaln = sum(n) h = 12.0 / (totaln*(totaln+1)) * ssbn - 3*(totaln+1) df = len(args) - 1 if T == 0: raise ValueError, 'All numbers are identical in akruskalwallish' h = h / float(T) return h, chisqprob(h,df) def afriedmanchisquare(*args): """ Friedman Chi-Square is a non-parametric, one-way within-subjects ANOVA. This function calculates the Friedman Chi-square test for repeated measures and returns the result, along with the associated probability value. It assumes 3 or more repeated measures. Only 3 levels requires a minimum of 10 subjects in the study. Four levels requires 5 subjects per level(??). Usage: afriedmanchisquare(*args) args are separate arrays for 2+ conditions Returns: chi-square statistic, associated p-value """ k = len(args) if k < 3: raise ValueError, '\nLess than 3 levels. Friedman test not appropriate.\n' n = len(args[0]) data = apply(pstats.aabut,args) data = data.astype(N.float_) for i in range(len(data)): data[i] = arankdata(data[i]) ssbn = asum(asum(args,1)**2) chisq = 12.0 / (k*n*(k+1)) * ssbn - 3*n*(k+1) return chisq, achisqprob(chisq,k-1) ##################################### #### APROBABILITY CALCULATIONS #### ##################################### def achisqprob(chisq,df): """ Returns the (1-tail) probability value associated with the provided chi-square value and df. Heavily modified from chisq.c in Gary Perlman's |Stat. Can handle multiple dimensions. Usage: achisqprob(chisq,df) chisq=chisquare stat., df=degrees of freedom """ BIG = 200.0 def ex(x): BIG = 200.0 exponents = N.where(N.less(x,-BIG),-BIG,x) return N.exp(exponents) if type(chisq) == N.ndarray: arrayflag = 1 else: arrayflag = 0 chisq = N.array([chisq]) if df < 1: return N.ones(chisq.shape,N.float) probs = N.zeros(chisq.shape,N.float_) probs = N.where(N.less_equal(chisq,0),1.0,probs) # set prob=1 for chisq<0 a = 0.5 * chisq if df > 1: y = ex(-a) if df%2 == 0: even = 1 s = y*1 s2 = s*1 else: even = 0 s = 2.0 * azprob(-N.sqrt(chisq)) s2 = s*1 if (df > 2): chisq = 0.5 * (df - 1.0) if even: z = N.ones(probs.shape,N.float_) else: z = 0.5 *N.ones(probs.shape,N.float_) if even: e = N.zeros(probs.shape,N.float_) else: e = N.log(N.sqrt(N.pi)) *N.ones(probs.shape,N.float_) c = N.log(a) mask = N.zeros(probs.shape) a_big = N.greater(a,BIG) a_big_frozen = -1 *N.ones(probs.shape,N.float_) totalelements = N.multiply.reduce(N.array(probs.shape)) while asum(mask)<>totalelements: e = N.log(z) + e s = s + ex(c*z-a-e) z = z + 1.0 # print z, e, s newmask = N.greater(z,chisq) a_big_frozen = N.where(newmask*N.equal(mask,0)*a_big, s, a_big_frozen) mask = N.clip(newmask+mask,0,1) if even: z = N.ones(probs.shape,N.float_) e = N.ones(probs.shape,N.float_) else: z = 0.5 *N.ones(probs.shape,N.float_) e = 1.0 / N.sqrt(N.pi) / N.sqrt(a) * N.ones(probs.shape,N.float_) c = 0.0 mask = N.zeros(probs.shape) a_notbig_frozen = -1 *N.ones(probs.shape,N.float_) while asum(mask)<>totalelements: e = e * (a/z.astype(N.float_)) c = c + e z = z + 1.0 # print '#2', z, e, c, s, c*y+s2 newmask = N.greater(z,chisq) a_notbig_frozen = N.where(newmask*N.equal(mask,0)*(1-a_big), c*y+s2, a_notbig_frozen) mask = N.clip(newmask+mask,0,1) probs = N.where(N.equal(probs,1),1, N.where(N.greater(a,BIG),a_big_frozen,a_notbig_frozen)) return probs else: return s def aerfcc(x): """ Returns the complementary error function erfc(x) with fractional error everywhere less than 1.2e-7. Adapted from Numerical Recipies. Can handle multiple dimensions. Usage: aerfcc(x) """ z = abs(x) t = 1.0 / (1.0+0.5*z) 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))))))))) return N.where(N.greater_equal(x,0), ans, 2.0-ans) def azprob(z): """ Returns the area under the normal curve 'to the left of' the given z value. Thus, for z<0, zprob(z) = 1-tail probability for z>0, 1.0-zprob(z) = 1-tail probability for any z, 2.0*(1.0-zprob(abs(z))) = 2-tail probability Adapted from z.c in Gary Perlman's |Stat. Can handle multiple dimensions. Usage: azprob(z) where z is a z-value """ def yfunc(y): x = (((((((((((((-0.000045255659 * y +0.000152529290) * y -0.000019538132) * y -0.000676904986) * y +0.001390604284) * y -0.000794620820) * y -0.002034254874) * y +0.006549791214) * y -0.010557625006) * y +0.011630447319) * y -0.009279453341) * y +0.005353579108) * y -0.002141268741) * y +0.000535310849) * y +0.999936657524 return x def wfunc(w): x = ((((((((0.000124818987 * w -0.001075204047) * w +0.005198775019) * w -0.019198292004) * w +0.059054035642) * w -0.151968751364) * w +0.319152932694) * w -0.531923007300) * w +0.797884560593) * N.sqrt(w) * 2.0 return x Z_MAX = 6.0 # maximum meaningful z-value x = N.zeros(z.shape,N.float_) # initialize y = 0.5 * N.fabs(z) x = N.where(N.less(y,1.0),wfunc(y*y),yfunc(y-2.0)) # get x's x = N.where(N.greater(y,Z_MAX*0.5),1.0,x) # kill those with big Z prob = N.where(N.greater(z,0),(x+1)*0.5,(1-x)*0.5) return prob def aksprob(alam): """ Returns the probability value for a K-S statistic computed via ks_2samp. Adapted from Numerical Recipies. Can handle multiple dimensions. Usage: aksprob(alam) """ if type(alam) == N.ndarray: frozen = -1 *N.ones(alam.shape,N.float64) alam = alam.astype(N.float64) arrayflag = 1 else: frozen = N.array(-1.) alam = N.array(alam,N.float64) arrayflag = 1 mask = N.zeros(alam.shape) fac = 2.0 *N.ones(alam.shape,N.float_) sum = N.zeros(alam.shape,N.float_) termbf = N.zeros(alam.shape,N.float_) a2 = N.array(-2.0*alam*alam,N.float64) totalelements = N.multiply.reduce(N.array(mask.shape)) for j in range(1,201): if asum(mask) == totalelements: break exponents = (a2*j*j) overflowmask = N.less(exponents,-746) frozen = N.where(overflowmask,0,frozen) mask = mask+overflowmask term = fac*N.exp(exponents) sum = sum + term newmask = N.where(N.less_equal(abs(term),(0.001*termbf)) + N.less(abs(term),1.0e-8*sum), 1, 0) frozen = N.where(newmask*N.equal(mask,0), sum, frozen) mask = N.clip(mask+newmask,0,1) fac = -fac termbf = abs(term) if arrayflag: return N.where(N.equal(frozen,-1), 1.0, frozen) # 1.0 if doesn't converge else: return N.where(N.equal(frozen,-1), 1.0, frozen)[0] # 1.0 if doesn't converge def afprob (dfnum, dfden, F): """ Returns the 1-tailed significance level (p-value) of an F statistic given the degrees of freedom for the numerator (dfR-dfF) and the degrees of freedom for the denominator (dfF). Can handle multiple dims for F. Usage: afprob(dfnum, dfden, F) where usually dfnum=dfbn, dfden=dfwn """ if type(F) == N.ndarray: return abetai(0.5*dfden, 0.5*dfnum, dfden/(1.0*dfden+dfnum*F)) else: return abetai(0.5*dfden, 0.5*dfnum, dfden/float(dfden+dfnum*F)) def abetacf(a,b,x,verbose=1): """ Evaluates the continued fraction form of the incomplete Beta function, betai. (Adapted from: Numerical Recipies in C.) Can handle multiple dimensions for x. Usage: abetacf(a,b,x,verbose=1) """ ITMAX = 200 EPS = 3.0e-7 arrayflag = 1 if type(x) == N.ndarray: frozen = N.ones(x.shape,N.float_) *-1 #start out w/ -1s, should replace all else: arrayflag = 0 frozen = N.array([-1]) x = N.array([x]) mask = N.zeros(x.shape) bm = az = am = 1.0 qab = a+b qap = a+1.0 qam = a-1.0 bz = 1.0-qab*x/qap for i in range(ITMAX+1): if N.sum(N.ravel(N.equal(frozen,-1)))==0: break em = float(i+1) tem = em + em d = em*(b-em)*x/((qam+tem)*(a+tem)) ap = az + d*am bp = bz+d*bm d = -(a+em)*(qab+em)*x/((qap+tem)*(a+tem)) app = ap+d*az bpp = bp+d*bz aold = az*1 am = ap/bpp bm = bp/bpp az = app/bpp bz = 1.0 newmask = N.less(abs(az-aold),EPS*abs(az)) frozen = N.where(newmask*N.equal(mask,0), az, frozen) mask = N.clip(mask+newmask,0,1) noconverge = asum(N.equal(frozen,-1)) if noconverge <> 0 and verbose: print 'a or b too big, or ITMAX too small in Betacf for ',noconverge,' elements' if arrayflag: return frozen else: return frozen[0] def agammln(xx): """ Returns the gamma function of xx. Gamma(z) = Integral(0,infinity) of t^(z-1)exp(-t) dt. Adapted from: Numerical Recipies in C. Can handle multiple dims ... but probably doesn't normally have to. Usage: agammln(xx) """ coeff = [76.18009173, -86.50532033, 24.01409822, -1.231739516, 0.120858003e-2, -0.536382e-5] x = xx - 1.0 tmp = x + 5.5 tmp = tmp - (x+0.5)*N.log(tmp) ser = 1.0 for j in range(len(coeff)): x = x + 1 ser = ser + coeff[j]/x return -tmp + N.log(2.50662827465*ser) def abetai(a,b,x,verbose=1): """ Returns the incomplete beta function: I-sub-x(a,b) = 1/B(a,b)*(Integral(0,x) of t^(a-1)(1-t)^(b-1) dt) where a,b>0 and B(a,b) = G(a)*G(b)/(G(a+b)) where G(a) is the gamma function of a. The continued fraction formulation is implemented here, using the betacf function. (Adapted from: Numerical Recipies in C.) Can handle multiple dimensions. Usage: abetai(a,b,x,verbose=1) """ TINY = 1e-15 if type(a) == N.ndarray: if asum(N.less(x,0)+N.greater(x,1)) <> 0: raise ValueError, 'Bad x in abetai' x = N.where(N.equal(x,0),TINY,x) x = N.where(N.equal(x,1.0),1-TINY,x) bt = N.where(N.equal(x,0)+N.equal(x,1), 0, -1) exponents = ( gammln(a+b)-gammln(a)-gammln(b)+a*N.log(x)+b* N.log(1.0-x) ) # 746 (below) is the MAX POSSIBLE BEFORE OVERFLOW exponents = N.where(N.less(exponents,-740),-740,exponents) bt = N.exp(exponents) if type(x) == N.ndarray: ans = N.where(N.less(x,(a+1)/(a+b+2.0)), bt*abetacf(a,b,x,verbose)/float(a), 1.0-bt*abetacf(b,a,1.0-x,verbose)/float(b)) else: if x<(a+1)/(a+b+2.0): ans = bt*abetacf(a,b,x,verbose)/float(a) else: ans = 1.0-bt*abetacf(b,a,1.0-x,verbose)/float(b) return ans ##################################### ####### AANOVA CALCULATIONS ####### ##################################### import LinearAlgebra, operator LA = LinearAlgebra def aglm(data,para): """ Calculates a linear model fit ... anova/ancova/lin-regress/t-test/etc. Taken from: Peterson et al. Statistical limitations in functional neuroimaging I. Non-inferential methods and statistical models. Phil Trans Royal Soc Lond B 354: 1239-1260. Usage: aglm(data,para) Returns: statistic, p-value ??? """ if len(para) <> len(data): print "data and para must be same length in aglm" return n = len(para) p = pstats.aunique(para) x = N.zeros((n,len(p))) # design matrix for l in range(len(p)): x[:,l] = N.equal(para,p[l]) b = N.dot(N.dot(LA.inv(N.dot(N.transpose(x),x)), # i.e., b=inv(X'X)X'Y N.transpose(x)), data) diffs = (data - N.dot(x,b)) s_sq = 1./(n-len(p)) * N.dot(N.transpose(diffs), diffs) if len(p) == 2: # ttest_ind c = N.array([1,-1]) df = n-2 fact = asum(1.0/asum(x,0)) # i.e., 1/n1 + 1/n2 + 1/n3 ... t = N.dot(c,b) / N.sqrt(s_sq*fact) probs = abetai(0.5*df,0.5,float(df)/(df+t*t)) return t, probs def aF_oneway(*args): """ Performs a 1-way ANOVA, returning an F-value and probability given any number of groups. From Heiman, pp.394-7. Usage: aF_oneway (*args) where *args is 2 or more arrays, one per treatment group Returns: f-value, probability """ na = len(args) # ANOVA on 'na' groups, each in it's own array means = [0]*na vars = [0]*na ns = [0]*na alldata = [] tmp = map(N.array,args) means = map(amean,tmp) vars = map(avar,tmp) ns = map(len,args) alldata = N.concatenate(args) bign = len(alldata) sstot = ass(alldata)-(asquare_of_sums(alldata)/float(bign)) ssbn = 0 for a in args: ssbn = ssbn + asquare_of_sums(N.array(a))/float(len(a)) ssbn = ssbn - (asquare_of_sums(alldata)/float(bign)) sswn = sstot-ssbn dfbn = na-1 dfwn = bign - na msb = ssbn/float(dfbn) msw = sswn/float(dfwn) f = msb/msw prob = fprob(dfbn,dfwn,f) return f, prob def aF_value (ER,EF,dfR,dfF): """ Returns an F-statistic given the following: ER = error associated with the null hypothesis (the Restricted model) EF = error associated with the alternate hypothesis (the Full model) dfR = degrees of freedom the Restricted model dfF = degrees of freedom associated with the Restricted model """ return ((ER-EF)/float(dfR-dfF) / (EF/float(dfF))) def outputfstats(Enum, Eden, dfnum, dfden, f, prob): Enum = round(Enum,3) Eden = round(Eden,3) dfnum = round(Enum,3) dfden = round(dfden,3) f = round(f,3) prob = round(prob,3) suffix = '' # for *s after the p-value if prob < 0.001: suffix = ' ***' elif prob < 0.01: suffix = ' **' elif prob < 0.05: suffix = ' *' title = [['EF/ER','DF','Mean Square','F-value','prob','']] lofl = title+[[Enum, dfnum, round(Enum/float(dfnum),3), f, prob, suffix], [Eden, dfden, round(Eden/float(dfden),3),'','','']] pstats.printcc(lofl) return def F_value_multivariate(ER, EF, dfnum, dfden): """ Returns an F-statistic given the following: ER = error associated with the null hypothesis (the Restricted model) EF = error associated with the alternate hypothesis (the Full model) dfR = degrees of freedom the Restricted model dfF = degrees of freedom associated with the Restricted model where ER and EF are matrices from a multivariate F calculation. """ if type(ER) in [IntType, FloatType]: ER = N.array([[ER]]) if type(EF) in [IntType, FloatType]: EF = N.array([[EF]]) n_um = (LA.det(ER) - LA.det(EF)) / float(dfnum) d_en = LA.det(EF) / float(dfden) return n_um / d_en ##################################### ####### ASUPPORT FUNCTIONS ######## ##################################### def asign(a): """ Usage: asign(a) Returns: array shape of a, with -1 where a<0 and +1 where a>=0 """ a = N.asarray(a) if ((type(a) == type(1.4)) or (type(a) == type(1))): return a-a-N.less(a,0)+N.greater(a,0) else: return N.zeros(N.shape(a))-N.less(a,0)+N.greater(a,0) def asum (a, dimension=None,keepdims=0): """ An alternative to the Numeric.add.reduce function, which allows one to (1) collapse over multiple dimensions at once, and/or (2) to retain all dimensions in the original array (squashing one down to size. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). If keepdims=1, the resulting array will have as many dimensions as the input array. Usage: asum(a, dimension=None, keepdims=0) Returns: array summed along 'dimension'(s), same _number_ of dims if keepdims=1 """ if type(a) == N.ndarray and a.dtype in [N.int_, N.short, N.ubyte]: a = a.astype(N.float_) if dimension == None: s = N.sum(N.ravel(a)) elif type(dimension) in [IntType,FloatType]: s = N.add.reduce(a, dimension) if keepdims == 1: shp = list(a.shape) shp[dimension] = 1 s = N.reshape(s,shp) else: # must be a SEQUENCE of dims to sum over dims = list(dimension) dims.sort() dims.reverse() s = a *1.0 for dim in dims: s = N.add.reduce(s,dim) if keepdims == 1: shp = list(a.shape) for dim in dims: shp[dim] = 1 s = N.reshape(s,shp) return s def acumsum (a,dimension=None): """ Returns an array consisting of the cumulative sum of the items in the passed array. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions, but this last one just barely makes sense). Usage: acumsum(a,dimension=None) """ if dimension == None: a = N.ravel(a) dimension = 0 if type(dimension) in [ListType, TupleType, N.ndarray]: dimension = list(dimension) dimension.sort() dimension.reverse() for d in dimension: a = N.add.accumulate(a,d) return a else: return N.add.accumulate(a,dimension) def ass(inarray, dimension=None, keepdims=0): """ Squares each value in the passed array, adds these squares & returns the result. Unfortunate function name. :-) Defaults to ALL values in the array. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). Set keepdims=1 to maintain the original number of dimensions. Usage: ass(inarray, dimension=None, keepdims=0) Returns: sum-along-'dimension' for (inarray*inarray) """ if dimension == None: inarray = N.ravel(inarray) dimension = 0 return asum(inarray*inarray,dimension,keepdims) def asummult (array1,array2,dimension=None,keepdims=0): """ Multiplies elements in array1 and array2, element by element, and returns the sum (along 'dimension') of all resulting multiplications. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). A trivial function, but included for completeness. Usage: asummult(array1,array2,dimension=None,keepdims=0) """ if dimension == None: array1 = N.ravel(array1) array2 = N.ravel(array2) dimension = 0 return asum(array1*array2,dimension,keepdims) def asquare_of_sums(inarray, dimension=None, keepdims=0): """ Adds the values in the passed array, squares that sum, and returns the result. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). If keepdims=1, the returned array will have the same NUMBER of dimensions as the original. Usage: asquare_of_sums(inarray, dimension=None, keepdims=0) Returns: the square of the sum over dim(s) in dimension """ if dimension == None: inarray = N.ravel(inarray) dimension = 0 s = asum(inarray,dimension,keepdims) if type(s) == N.ndarray: return s.astype(N.float_)*s else: return float(s)*s def asumdiffsquared(a,b, dimension=None, keepdims=0): """ Takes pairwise differences of the values in arrays a and b, squares these differences, and returns the sum of these squares. Dimension can equal None (ravel array first), an integer (the dimension over which to operate), or a sequence (operate over multiple dimensions). keepdims=1 means the return shape = len(a.shape) = len(b.shape) Usage: asumdiffsquared(a,b) Returns: sum[ravel(a-b)**2] """ if dimension == None: inarray = N.ravel(a) dimension = 0 return asum((a-b)**2,dimension,keepdims) def ashellsort(inarray): """ Shellsort algorithm. Sorts a 1D-array. Usage: ashellsort(inarray) Returns: sorted-inarray, sorting-index-vector (for original array) """ n = len(inarray) svec = inarray *1.0 ivec = range(n) gap = n/2 # integer division needed while gap >0: for i in range(gap,n): for j in range(i-gap,-1,-gap): while j>=0 and svec[j]>svec[j+gap]: temp = svec[j] svec[j] = svec[j+gap] svec[j+gap] = temp itemp = ivec[j] ivec[j] = ivec[j+gap] ivec[j+gap] = itemp gap = gap / 2 # integer division needed # svec is now sorted input vector, ivec has the order svec[i] = vec[ivec[i]] return svec, ivec def arankdata(inarray): """ Ranks the data in inarray, dealing with ties appropritely. Assumes a 1D inarray. Adapted from Gary Perlman's |Stat ranksort. Usage: arankdata(inarray) Returns: array of length equal to inarray, containing rank scores """ n = len(inarray) svec, ivec = ashellsort(inarray) sumranks = 0 dupcount = 0 newarray = N.zeros(n,N.float_) for i in range(n): sumranks = sumranks + i dupcount = dupcount + 1 if i==n-1 or svec[i] <> svec[i+1]: averank = sumranks / float(dupcount) + 1 for j in range(i-dupcount+1,i+1): newarray[ivec[j]] = averank sumranks = 0 dupcount = 0 return newarray def afindwithin(data): """ Returns a binary vector, 1=within-subject factor, 0=between. Input equals the entire data array (i.e., column 1=random factor, last column = measured values. Usage: afindwithin(data) data in |Stat format """ numfact = len(data[0])-2 withinvec = [0]*numfact for col in range(1,numfact+1): rows = pstats.linexand(data,col,pstats.unique(pstats.colex(data,1))[0]) # get 1 level of this factor if len(pstats.unique(pstats.colex(rows,0))) < len(rows): # if fewer subjects than scores on this factor withinvec[col-1] = 1 return withinvec ######################################################### ######################################################### ###### RE-DEFINE DISPATCHES TO INCLUDE ARRAYS ######### ######################################################### ######################################################### ## CENTRAL TENDENCY: geometricmean = Dispatch ( (lgeometricmean, (ListType, TupleType)), (ageometricmean, (N.ndarray,)) ) harmonicmean = Dispatch ( (lharmonicmean, (ListType, TupleType)), (aharmonicmean, (N.ndarray,)) ) mean = Dispatch ( (lmean, (ListType, TupleType)), (amean, (N.ndarray,)) ) median = Dispatch ( (lmedian, (ListType, TupleType)), (amedian, (N.ndarray,)) ) medianscore = Dispatch ( (lmedianscore, (ListType, TupleType)), (amedianscore, (N.ndarray,)) ) mode = Dispatch ( (lmode, (ListType, TupleType)), (amode, (N.ndarray,)) ) tmean = Dispatch ( (atmean, (N.ndarray,)) ) tvar = Dispatch ( (atvar, (N.ndarray,)) ) tstdev = Dispatch ( (atstdev, (N.ndarray,)) ) tsem = Dispatch ( (atsem, (N.ndarray,)) ) ## VARIATION: moment = Dispatch ( (lmoment, (ListType, TupleType)), (amoment, (N.ndarray,)) ) variation = Dispatch ( (lvariation, (ListType, TupleType)), (avariation, (N.ndarray,)) ) skew = Dispatch ( (lskew, (ListType, TupleType)), (askew, (N.ndarray,)) ) kurtosis = Dispatch ( (lkurtosis, (ListType, TupleType)), (akurtosis, (N.ndarray,)) ) describe = Dispatch ( (ldescribe, (ListType, TupleType)), (adescribe, (N.ndarray,)) ) ## DISTRIBUTION TESTS skewtest = Dispatch ( (askewtest, (ListType, TupleType)), (askewtest, (N.ndarray,)) ) kurtosistest = Dispatch ( (akurtosistest, (ListType, TupleType)), (akurtosistest, (N.ndarray,)) ) normaltest = Dispatch ( (anormaltest, (ListType, TupleType)), (anormaltest, (N.ndarray,)) ) ## FREQUENCY STATS: itemfreq = Dispatch ( (litemfreq, (ListType, TupleType)), (aitemfreq, (N.ndarray,)) ) scoreatpercentile = Dispatch ( (lscoreatpercentile, (ListType, TupleType)), (ascoreatpercentile, (N.ndarray,)) ) percentileofscore = Dispatch ( (lpercentileofscore, (ListType, TupleType)), (apercentileofscore, (N.ndarray,)) ) histogram = Dispatch ( (lhistogram, (ListType, TupleType)), (ahistogram, (N.ndarray,)) ) cumfreq = Dispatch ( (lcumfreq, (ListType, TupleType)), (acumfreq, (N.ndarray,)) ) relfreq = Dispatch ( (lrelfreq, (ListType, TupleType)), (arelfreq, (N.ndarray,)) ) ## VARIABILITY: obrientransform = Dispatch ( (lobrientransform, (ListType, TupleType)), (aobrientransform, (N.ndarray,)) ) samplevar = Dispatch ( (lsamplevar, (ListType, TupleType)), (asamplevar, (N.ndarray,)) ) samplestdev = Dispatch ( (lsamplestdev, (ListType, TupleType)), (asamplestdev, (N.ndarray,)) ) signaltonoise = Dispatch( (asignaltonoise, (N.ndarray,)),) var = Dispatch ( (lvar, (ListType, TupleType)), (avar, (N.ndarray,)) ) stdev = Dispatch ( (lstdev, (ListType, TupleType)), (astdev, (N.ndarray,)) ) sterr = Dispatch ( (lsterr, (ListType, TupleType)), (asterr, (N.ndarray,)) ) sem = Dispatch ( (lsem, (ListType, TupleType)), (asem, (N.ndarray,)) ) z = Dispatch ( (lz, (ListType, TupleType)), (az, (N.ndarray,)) ) zs = Dispatch ( (lzs, (ListType, TupleType)), (azs, (N.ndarray,)) ) ## TRIMMING FCNS: threshold = Dispatch( (athreshold, (N.ndarray,)),) trimboth = Dispatch ( (ltrimboth, (ListType, TupleType)), (atrimboth, (N.ndarray,)) ) trim1 = Dispatch ( (ltrim1, (ListType, TupleType)), (atrim1, (N.ndarray,)) ) ## CORRELATION FCNS: paired = Dispatch ( (lpaired, (ListType, TupleType)), (apaired, (N.ndarray,)) ) lincc = Dispatch ( (llincc, (ListType, TupleType)), (alincc, (N.ndarray,)) ) pearsonr = Dispatch ( (lpearsonr, (ListType, TupleType)), (apearsonr, (N.ndarray,)) ) spearmanr = Dispatch ( (lspearmanr, (ListType, TupleType)), (aspearmanr, (N.ndarray,)) ) pointbiserialr = Dispatch ( (lpointbiserialr, (ListType, TupleType)), (apointbiserialr, (N.ndarray,)) ) kendalltau = Dispatch ( (lkendalltau, (ListType, TupleType)), (akendalltau, (N.ndarray,)) ) linregress = Dispatch ( (llinregress, (ListType, TupleType)), (alinregress, (N.ndarray,)) ) ## INFERENTIAL STATS: ttest_1samp = Dispatch ( (lttest_1samp, (ListType, TupleType)), (attest_1samp, (N.ndarray,)) ) ttest_ind = Dispatch ( (lttest_ind, (ListType, TupleType)), (attest_ind, (N.ndarray,)) ) ttest_rel = Dispatch ( (lttest_rel, (ListType, TupleType)), (attest_rel, (N.ndarray,)) ) chisquare = Dispatch ( (lchisquare, (ListType, TupleType)), (achisquare, (N.ndarray,)) ) ks_2samp = Dispatch ( (lks_2samp, (ListType, TupleType)), (aks_2samp, (N.ndarray,)) ) mannwhitneyu = Dispatch ( (lmannwhitneyu, (ListType, TupleType)), (amannwhitneyu, (N.ndarray,)) ) tiecorrect = Dispatch ( (ltiecorrect, (ListType, TupleType)), (atiecorrect, (N.ndarray,)) ) ranksums = Dispatch ( (lranksums, (ListType, TupleType)), (aranksums, (N.ndarray,)) ) wilcoxont = Dispatch ( (lwilcoxont, (ListType, TupleType)), (awilcoxont, (N.ndarray,)) ) kruskalwallish = Dispatch ( (lkruskalwallish, (ListType, TupleType)), (akruskalwallish, (N.ndarray,)) ) friedmanchisquare = Dispatch ( (lfriedmanchisquare, (ListType, TupleType)), (afriedmanchisquare, (N.ndarray,)) ) ## PROBABILITY CALCS: chisqprob = Dispatch ( (lchisqprob, (IntType, FloatType)), (achisqprob, (N.ndarray,)) ) zprob = Dispatch ( (lzprob, (IntType, FloatType)), (azprob, (N.ndarray,)) ) ksprob = Dispatch ( (lksprob, (IntType, FloatType)), (aksprob, (N.ndarray,)) ) fprob = Dispatch ( (lfprob, (IntType, FloatType)), (afprob, (N.ndarray,)) ) betacf = Dispatch ( (lbetacf, (IntType, FloatType)), (abetacf, (N.ndarray,)) ) betai = Dispatch ( (lbetai, (IntType, FloatType)), (abetai, (N.ndarray,)) ) erfcc = Dispatch ( (lerfcc, (IntType, FloatType)), (aerfcc, (N.ndarray,)) ) gammln = Dispatch ( (lgammln, (IntType, FloatType)), (agammln, (N.ndarray,)) ) ## ANOVA FUNCTIONS: F_oneway = Dispatch ( (lF_oneway, (ListType, TupleType)), (aF_oneway, (N.ndarray,)) ) F_value = Dispatch ( (lF_value, (ListType, TupleType)), (aF_value, (N.ndarray,)) ) ## SUPPORT FUNCTIONS: incr = Dispatch ( (lincr, (ListType, TupleType, N.ndarray)), ) sum = Dispatch ( (lsum, (ListType, TupleType)), (asum, (N.ndarray,)) ) cumsum = Dispatch ( (lcumsum, (ListType, TupleType)), (acumsum, (N.ndarray,)) ) ss = Dispatch ( (lss, (ListType, TupleType)), (ass, (N.ndarray,)) ) summult = Dispatch ( (lsummult, (ListType, TupleType)), (asummult, (N.ndarray,)) ) square_of_sums = Dispatch ( (lsquare_of_sums, (ListType, TupleType)), (asquare_of_sums, (N.ndarray,)) ) sumdiffsquared = Dispatch ( (lsumdiffsquared, (ListType, TupleType)), (asumdiffsquared, (N.ndarray,)) ) shellsort = Dispatch ( (lshellsort, (ListType, TupleType)), (ashellsort, (N.ndarray,)) ) rankdata = Dispatch ( (lrankdata, (ListType, TupleType)), (arankdata, (N.ndarray,)) ) findwithin = Dispatch ( (lfindwithin, (ListType, TupleType)), (afindwithin, (N.ndarray,)) ) ###################### END OF NUMERIC FUNCTION BLOCK ##################### ###################### END OF STATISTICAL FUNCTIONS ###################### except ImportError: pass ================================================ FILE: src/main/thrift/build.sh ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Helper for building thrift files rm -rf ../gen-java/* for FILE in $(ls |grep thrift) do thrift --gen java:java5 -o ../ $FILE done ================================================ FILE: src/main/thrift/service.thrift ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # include 'types.thrift' namespace java edu.berkeley.sparrow.thrift # SchedulerService is used by application frontends to communicate with Sparrow # and place jobs. service SchedulerService { # Register a frontend for the given application. bool registerFrontend(1: string app, 2: string socketAddress); # Submit a job composed of a list of individual tasks. void submitJob(1: types.TSchedulingRequest req) throws (1: types.IncompleteRequestException e); # Send a message to be delivered to the frontend for {app} pertaining # to the task {taskId}. The {status} field allows for application-specific # status enumerations. Right now this is used only for Spark, which relies on # the scheduler to send task completion messages to frontends. void sendFrontendMessage(1: string app, 2: types.TFullTaskId taskId, 3: i32 status, 4: binary message); } service GetTaskService { # Called by a node monitor when it has available responses to run a task. Always called in # response to an enqueueTask() request from this scheduler, requestId specifies the ID given # in that enqueueTask() request. Currently, we only support returning 0 or 1 task # specs, where 0 signals that the given request has no more tasks that can be launched on the # node. # TODO: Add a numTasks parameter to signal how many slots are free, and support # returning more than 1 tasks. list getTask(1: string requestId, 2: types.THostPort nodeMonitorAddress); } # A service used by application backends to coordinate with Sparrow. service NodeMonitorService { # Register this machine as a backend for the given application. bool registerBackend(1: string app, 2: string listenSocket); # Inform the NodeMonitor that a particular task has finished void tasksFinished(1: list tasks); # See SchedulerService.sendFrontendMessage void sendFrontendMessage(1: string app, 2: types.TFullTaskId taskId, 3: i32 status, 4: binary message); } # A service that backends are expected to extend. Handles communication # from a NodeMonitor. service BackendService { void launchTask(1: binary message, 2: types.TFullTaskId taskId, 3: types.TUserGroupInfo user); } # A service that frontends are expected to extend. Handles communication from # a Scheduler. service FrontendService { # See SchedulerService.sendFrontendMessage void frontendMessage(1: types.TFullTaskId taskId, 2: i32 status, 3: binary message); } # The InternalService exposes state about application backends to other Sparrow daemons. service InternalService { # Enqueues a reservation to launch the given number of tasks. The NodeMonitor sends # a GetTask() RPC to the given schedulerAddress when it is ready to launch a task, for each # enqueued task reservation. Returns whether or not the task was successfully enqueued. bool enqueueTaskReservations(1: types.TEnqueueTaskReservationsRequest request); # Cancels reservations for jobs for which all tasks have already been launched. void cancelTaskReservations(1: types.TCancelTaskReservationsRequest request); } service SchedulerStateStoreService { # Message from the state store giving the scheduler new information void updateNodeState(1: map snapshot); } service StateStoreService { # Register a scheduler with the given socket address (IP: Port) void registerScheduler(1: string schedulerAddress); # Register a node monitor with the given socket address (IP: Port) void registerNodeMonitor(1: string nodeMonitorAddress); } # Service to use for debugging network latencies. service PongService { string ping(1: string data); } ================================================ FILE: src/main/thrift/types.thrift ================================================ # # Copyright 2013 The Regents of The University California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # namespace java edu.berkeley.sparrow.thrift exception IncompleteRequestException { 1: string message; } struct THostPort { // The host should always be represented as an IP address! 1: string host; 2: i32 port; } struct TPlacementPreference { 1: list nodes; // List of preferred nodes, described by their hostname. 2: list racks; // Not currently supported. 3: i32 delayThreshold; // Threshold for delay scheduling (not currently supported). } struct TResourceVector { 1: i64 memory; // Memory, in Mb 2: i32 cores; // # Cores } // A fully-specified Sparrow task has four identifiers // neeed? struct TFullTaskId { 1: string taskId; // Task ID as reported from the FE 2: string requestId; // Scheduling request ID as assigned by the FE 3: string appId; // ID of the application 4: THostPort schedulerAddress; // Address of the scheduler that scheduled the task. } struct TUserGroupInfo { 1: string user; 2: string group; // Priority of the user. If the node monitor is using the priority task scheduler, // it will place the tasks with the smallest numbered priority first. 3: i32 priority; } struct TTaskSpec { 1: string taskId; 2: TPlacementPreference preference; 3: binary message; } struct TSchedulingRequest { 1: string app; 2: list tasks; 3: TUserGroupInfo user; # A description that will be logged alongside the requestId that Sparrow assigns. 4: optional string description; # Hack to allow us to specify the probe ratio for certain types of requests. 5: optional double probeRatio; } struct TEnqueueTaskReservationsRequest { 1: string appId; 2: TUserGroupInfo user; 3: string requestId; 4: THostPort schedulerAddress; 5: i32 numTasks; } struct TCancelTaskReservationsRequest { 1: string requestId; } # Information needed to launch a task. The application and user information are not needed # because they're included when the task is enqueued, so the node monitor already has them at # launch time. struct TTaskLaunchSpec { # Task ID (originally assigned by the application) 1: string taskId; # Description of the task passed on to the application backend (opaque to Sparrow). 2: binary message; } struct LoadSpec { 1: double load; } # Represents the State Store's view of resource consumption on a Sparrow node. # TODO: will include information about per-user accounting. struct TNodeState { 1: TResourceVector sparrowUsage; # Resources used by Sparrow 2: TResourceVector externalUsage; # Resources used by other schedulers } ================================================ FILE: src/test/java/edu/berkeley/sparrow/daemon/nodemonitor/TestTaskScheduler.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.nodemonitor; import static org.junit.Assert.assertEquals; import java.net.InetSocketAddress; import java.util.List; import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.log4j.BasicConfigurator; import org.junit.Before; import org.junit.Test; import com.google.common.collect.Lists; import edu.berkeley.sparrow.daemon.nodemonitor.TaskScheduler.TaskSpec; import edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest; import edu.berkeley.sparrow.thrift.TFullTaskId; import edu.berkeley.sparrow.thrift.THostPort; import edu.berkeley.sparrow.thrift.TUserGroupInfo; public class TestTaskScheduler { int requestId; @Before public void setUp() { // Set up a simple configuration that logs on the console. BasicConfigurator.configure(); requestId = 1; } private TEnqueueTaskReservationsRequest createTaskReservationRequest( int numTasks, TaskScheduler scheduler, String userId) { return createTaskReservationRequest(numTasks, scheduler, userId, 0); } private TEnqueueTaskReservationsRequest createTaskReservationRequest( int numTasks, TaskScheduler scheduler, String userId, int priority) { String idStr = Integer.toString(requestId++); TUserGroupInfo user = new TUserGroupInfo(userId, "group", priority); THostPort schedulerAddress = new THostPort("1.2.3.4", 52); return new TEnqueueTaskReservationsRequest( "appId", user, idStr, schedulerAddress, numTasks); } /** * Tests the fifo task scheduler. */ @Test public void testFifo() { TaskScheduler scheduler = new FifoTaskScheduler(4); scheduler.initialize(new PropertiesConfiguration(), 12345); final String testApp = "test app"; final InetSocketAddress backendAddress = new InetSocketAddress("123.4.5.6", 2); // Make sure that tasks are launched right away, if resources are available. scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, testApp), backendAddress); assertEquals(1, scheduler.runnableTasks()); TaskSpec task = scheduler.getNextTask(); assertEquals("1", task.requestId); assertEquals(0, scheduler.runnableTasks()); scheduler.submitTaskReservations(createTaskReservationRequest(2, scheduler, testApp), backendAddress); assertEquals(2, scheduler.runnableTasks()); // Make sure the request to schedule 3 tasks is appropriately split, with one task running // now and others started later. scheduler.submitTaskReservations(createTaskReservationRequest(3, scheduler, testApp), backendAddress); /* 4 tasks have been launched but one was already removed from the runnable queue using * getTask(), leaving 3 runnable tasks. */ assertEquals(3, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("2", task.requestId); task = scheduler.getNextTask(); assertEquals("2", task.requestId); /* Make a list of task ids to use in every call to tasksFinished, and just update the request * id for each call. */ TFullTaskId fullTaskId = new TFullTaskId(); fullTaskId.taskId = ""; List completedTasks = Lists.newArrayList(); completedTasks.add(fullTaskId); // Have a few tasks complete before the last runnable task is removed from the queue. fullTaskId.requestId = "2"; scheduler.tasksFinished(completedTasks); scheduler.tasksFinished(completedTasks); fullTaskId.requestId = "1"; scheduler.tasksFinished(completedTasks); task = scheduler.getNextTask(); assertEquals("3", task.requestId); task = scheduler.getNextTask(); assertEquals("3", task.requestId); task = scheduler.getNextTask(); assertEquals("3", task.requestId); assertEquals(0, scheduler.runnableTasks()); } /** * Tests the round robin task scheduler. */ @Test public void testBasicRoundRobin() { TaskScheduler scheduler = new RoundRobinTaskScheduler(4); scheduler.initialize(new PropertiesConfiguration(), 12345); final String user1 = "user1"; final InetSocketAddress address1 = new InetSocketAddress("localhost", 1); final String user2 = "user2"; final InetSocketAddress address2 = new InetSocketAddress("localhost", 1); final String user3 = "user3"; final InetSocketAddress address3 = new InetSocketAddress("localhost", 1); final String user4 = "user4"; final InetSocketAddress address4 = new InetSocketAddress("localhost", 1); // Submit enough tasks to saturate the existing capacity. scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user1), address1); assertEquals(1, scheduler.runnableTasks()); scheduler.getNextTask(); assertEquals(0, scheduler.runnableTasks()); scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user2), address2); assertEquals(1, scheduler.runnableTasks()); scheduler.getNextTask(); assertEquals(0, scheduler.runnableTasks()); scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user3), address3); assertEquals(1, scheduler.runnableTasks()); scheduler.getNextTask(); assertEquals(0, scheduler.runnableTasks()); scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user4), address4); assertEquals(1, scheduler.runnableTasks()); scheduler.getNextTask(); assertEquals(0, scheduler.runnableTasks()); /* Create the following backlogs. * user1: 2 tasks * user2: 3 tasks * user3: 4 tasks */ scheduler.submitTaskReservations( createTaskReservationRequest(2, scheduler, user1), address1); scheduler.submitTaskReservations( createTaskReservationRequest(1, scheduler, user2), address2); scheduler.submitTaskReservations( createTaskReservationRequest(1, scheduler, user2), address2); scheduler.submitTaskReservations( createTaskReservationRequest(1, scheduler, user2), address2); scheduler.submitTaskReservations( createTaskReservationRequest(4, scheduler, user3), address3); assertEquals(0, scheduler.runnableTasks()); /* Make sure that as tasks finish (and space is freed up) new tasks are added to the runqueue * in round-robin order. * Make a list of task ids to use in every call to tasksFinished, and just update the request * id. */ TFullTaskId fullTaskId = new TFullTaskId(); fullTaskId.taskId = ""; List completedTasks = Lists.newArrayList(); completedTasks.add(fullTaskId); fullTaskId.requestId = "1"; scheduler.tasksFinished(completedTasks); assertEquals(1, scheduler.runnableTasks()); TaskSpec task = scheduler.getNextTask(); assertEquals("5", task.requestId); assertEquals(0, scheduler.runnableTasks()); fullTaskId.requestId = task.requestId; scheduler.tasksFinished(completedTasks); assertEquals(1, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("6", task.requestId); assertEquals(0, scheduler.runnableTasks()); fullTaskId.requestId = task.requestId; scheduler.tasksFinished(completedTasks); assertEquals(1, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("9", task.requestId); assertEquals(0, scheduler.runnableTasks()); fullTaskId.requestId = task.requestId; scheduler.tasksFinished(completedTasks); assertEquals(1, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("5", task.requestId); assertEquals(0, scheduler.runnableTasks()); fullTaskId.requestId = task.requestId; scheduler.tasksFinished(completedTasks); assertEquals(1, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("7", task.requestId); assertEquals(0, scheduler.runnableTasks()); fullTaskId.requestId = task.requestId; scheduler.tasksFinished(completedTasks); assertEquals(1, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("9", task.requestId); assertEquals(0, scheduler.runnableTasks()); fullTaskId.requestId = task.requestId; scheduler.tasksFinished(completedTasks); assertEquals(1, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("8", task.requestId); assertEquals(0, scheduler.runnableTasks()); fullTaskId.requestId = task.requestId; scheduler.tasksFinished(completedTasks); assertEquals(1, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("9", task.requestId); assertEquals(0, scheduler.runnableTasks()); fullTaskId.requestId = task.requestId; scheduler.tasksFinished(completedTasks); assertEquals(1, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("9", task.requestId); assertEquals(0, scheduler.runnableTasks()); } @Test public void testRoundRobinDoesNotGiveUpUserSpotWhenGetTaskFails() { TaskScheduler scheduler = new RoundRobinTaskScheduler(4); scheduler.initialize(new PropertiesConfiguration(), 12345); final String user1 = "user1"; final InetSocketAddress address1 = new InetSocketAddress("localhost", 1); final String user2 = "user2"; final InetSocketAddress address2 = new InetSocketAddress("localhost", 1); final String user3 = "user3"; final InetSocketAddress address3 = new InetSocketAddress("localhost", 1); final String user4 = "user4"; final InetSocketAddress address4 = new InetSocketAddress("localhost", 1); // Submit enough tasks to saturate the existing capacity. scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user1), address1); assertEquals(1, scheduler.runnableTasks()); scheduler.getNextTask(); assertEquals(0, scheduler.runnableTasks()); scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user2), address2); assertEquals(1, scheduler.runnableTasks()); TaskSpec user2Task = scheduler.getNextTask(); assertEquals(0, scheduler.runnableTasks()); scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user3), address3); assertEquals(1, scheduler.runnableTasks()); scheduler.getNextTask(); assertEquals(0, scheduler.runnableTasks()); scheduler.submitTaskReservations(createTaskReservationRequest(1, scheduler, user4), address4); assertEquals(1, scheduler.runnableTasks()); scheduler.getNextTask(); assertEquals(0, scheduler.runnableTasks()); /* Create the following backlogs. * user1: 2 tasks * user2: 3 tasks * user3: 4 tasks */ scheduler.submitTaskReservations( createTaskReservationRequest(2, scheduler, user1), address1); scheduler.submitTaskReservations( createTaskReservationRequest(1, scheduler, user2), address2); scheduler.submitTaskReservations( createTaskReservationRequest(1, scheduler, user2), address2); scheduler.submitTaskReservations( createTaskReservationRequest(1, scheduler, user2), address2); scheduler.submitTaskReservations( createTaskReservationRequest(4, scheduler, user3), address3); assertEquals(0, scheduler.runnableTasks()); // If the getTask() for user 2 fails, the scheduler should try to get another task // for that user rather than using the usual round-robin ordering. scheduler.noTaskForReservation(user2Task); assertEquals(1, scheduler.runnableTasks()); user2Task = scheduler.getNextTask(); assertEquals(user2, user2Task.user.user); assertEquals("6", user2Task.requestId); assertEquals(0, scheduler.runnableTasks()); // The scheduler should resume round-robin from user 1 (and not start the round-robin // again after user 2). TFullTaskId fullTaskId = new TFullTaskId(); fullTaskId.taskId = ""; List completedTasks = Lists.newArrayList(); completedTasks.add(fullTaskId); fullTaskId.requestId = "1"; scheduler.tasksFinished(completedTasks); assertEquals(1, scheduler.runnableTasks()); TaskSpec task = scheduler.getNextTask(); assertEquals(user1, task.user.user); assertEquals("5", task.requestId); assertEquals(0, scheduler.runnableTasks()); // If the scheduler eventually exhausts the queue of tasks for user 2, and cannot launch any, // it sound continue in round-robin order. scheduler.noTaskForReservation(user2Task); assertEquals(1, scheduler.runnableTasks()); user2Task = scheduler.getNextTask(); assertEquals(user2, user2Task.user.user); assertEquals("7", user2Task.requestId); assertEquals(0, scheduler.runnableTasks()); scheduler.noTaskForReservation(user2Task); assertEquals(1, scheduler.runnableTasks()); user2Task = scheduler.getNextTask(); assertEquals(user2, user2Task.user.user); assertEquals("8", user2Task.requestId); assertEquals(0, scheduler.runnableTasks()); scheduler.noTaskForReservation(user2Task); assertEquals(1, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals(user3, task.user.user); assertEquals("9", task.requestId); assertEquals(0, scheduler.runnableTasks()); } @Test public void testPriority() { /* Submit tasks at priority 0, 1, and 2 and ensure that the highest priority tasks are * run soonest. */ TaskScheduler scheduler = new PriorityTaskScheduler(4); scheduler.initialize(new PropertiesConfiguration(), 12345); final InetSocketAddress appBackendAddress = new InetSocketAddress("localhost", 1); final String user = "user"; // Submit enough tasks to saturate the existing capacity (with one task queued). scheduler.submitTaskReservations( createTaskReservationRequest(5, scheduler, user, 2), appBackendAddress); assertEquals(4, scheduler.runnableTasks()); // Submit 3 tasks for higher priority users (2 at priority 1 and 1 at priority 0). scheduler.submitTaskReservations( createTaskReservationRequest(2, scheduler, user, 1), appBackendAddress); scheduler.submitTaskReservations( createTaskReservationRequest(1, scheduler, user, 0), appBackendAddress); TaskSpec task = scheduler.getNextTask(); assertEquals("1", task.requestId); assertEquals(3, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("1", task.requestId); assertEquals(2, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("1", task.requestId); assertEquals(1, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("1", task.requestId); assertEquals(0, scheduler.runnableTasks()); /* Make sure that as tasks finish, new tasks are added to the runqueue in strictly priority * order. */ TFullTaskId fullTaskId = new TFullTaskId(); fullTaskId.taskId = ""; List completedTasks = Lists.newArrayList(); completedTasks.add(fullTaskId); fullTaskId.requestId = "1"; scheduler.tasksFinished(completedTasks); assertEquals(1, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("3", task.requestId); assertEquals(0, scheduler.runnableTasks()); scheduler.tasksFinished(completedTasks); assertEquals(1, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("2", task.requestId); assertEquals(0, scheduler.runnableTasks()); scheduler.tasksFinished(completedTasks); assertEquals(1, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("2", task.requestId); assertEquals(0, scheduler.runnableTasks()); scheduler.tasksFinished(completedTasks); assertEquals(1, scheduler.runnableTasks()); task = scheduler.getNextTask(); assertEquals("1", task.requestId); assertEquals(0, scheduler.runnableTasks()); } } ================================================ FILE: src/test/java/edu/berkeley/sparrow/daemon/scheduler/TestConstrainedTaskPlacer.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.scheduler; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import org.apache.log4j.BasicConfigurator; import org.junit.After; import org.junit.Before; import org.junit.Test; import edu.berkeley.sparrow.daemon.util.Network; import edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest; import edu.berkeley.sparrow.thrift.THostPort; import edu.berkeley.sparrow.thrift.TPlacementPreference; import edu.berkeley.sparrow.thrift.TSchedulingRequest; import edu.berkeley.sparrow.thrift.TTaskLaunchSpec; import edu.berkeley.sparrow.thrift.TTaskSpec; import edu.berkeley.sparrow.thrift.TUserGroupInfo; public class TestConstrainedTaskPlacer { private static final String APP_ID = "test app"; private static final String USER = "user"; private static final String GROUP = "group"; private static final int PRIORITY = 0; private static final String REQUEST_ID = "request id"; private static final THostPort SCHEDULER_ADDRESS = new THostPort("localhost", 12345); private static final int ITERATIONS = 1; private static final TUserGroupInfo user = new TUserGroupInfo(USER, GROUP, PRIORITY); private static final Set preferredNodes = new HashSet(); private static final Set allBackends = new HashSet(); @Before public void setUp() { // Set up a simple configuration that logs on the console. BasicConfigurator.configure(); } @After public void tearDown() { preferredNodes.clear(); allBackends.clear(); } /** Sanity checks a list of requests returned by {@code getEnqueueTaskReservationsRequests()}. * * For each request, ensures that the reservation is on one of the preferred nodes, and that it * has the appropriate app id/user/request id/scheduler address. */ private void sanityCheckRequests( Map requests, int expectedTotalReservations) { int totalEnqueuedTasks = 0; for (Entry entry : requests.entrySet()) { // The node monitor the request is being sent to should be among the list of preferred // nodes. assertTrue("Expect " + entry.getKey() + " to be among the set of preferred nodes", preferredNodes.contains(entry.getKey())); TEnqueueTaskReservationsRequest request = entry.getValue(); assertEquals(request.getAppId(), APP_ID); assertEquals(request.getUser(), user); assertEquals(request.getRequestId(), REQUEST_ID); assertEquals(request.getSchedulerAddress(), SCHEDULER_ADDRESS); assertTrue(request.getNumTasks() > 0); totalEnqueuedTasks += request.getNumTasks(); } assertEquals(expectedTotalReservations, totalEnqueuedTasks); } /** Generates a scheduling request with 3 tasks, and populates preferredNodes/allBackends. */ private TSchedulingRequest generateSchedulingRequests() { preferredNodes.add(new InetSocketAddress("123.4.5.6", 1)); preferredNodes.add(new InetSocketAddress("3.4.5.6", 56)); preferredNodes.add(new InetSocketAddress("4.2.3.67", 89)); preferredNodes.add(new InetSocketAddress("4.1.23.45", 100)); preferredNodes.add(new InetSocketAddress("9.0.0.0", 204)); List preferredNodesList = new ArrayList(preferredNodes); // Create 3 tasks with overlapping placement preferences (all tasks include // preferredNodesList[2] in their placement preferences). ByteBuffer message = ByteBuffer.allocate(1); List tasks = new ArrayList(); final int NUM_TASKS = 3; for (int i = 0; i < NUM_TASKS; ++i) { TPlacementPreference placementPreference = new TPlacementPreference(); for (int j = i; j < i + 3; ++j) { placementPreference.addToNodes(preferredNodesList.get(j).getAddress().getHostAddress()); } String id = "test task " + i; tasks.add(new TTaskSpec(id, placementPreference, message)); } TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user); // Create list of available backend nodes, with some additional nodes in addition to the // preferred ones. allBackends.addAll(preferredNodes); allBackends.add(new InetSocketAddress("1.2.3.4", 345)); allBackends.add(new InetSocketAddress("5.6.7.81", 2000)); return schedulingRequest; } /** * Creates a scheduling request with a single task that has 3 preferred nodes, and ensures * that repeated calls to getEnqueueTaskReservationsRequests always returns requests for one * of those three nodes. */ @Test public void testGetEnqueueTaskReservationsRequestsSingleTask() { ConstrainedTaskPlacer taskPlacer = new ConstrainedTaskPlacer(REQUEST_ID, 2); preferredNodes.add(new InetSocketAddress("127.0.0.1", 22)); preferredNodes.add(new InetSocketAddress("123.4.5.6", 20000)); preferredNodes.add(new InetSocketAddress("7.0.0.9", 45)); // Create a single task with three placement preferences. ByteBuffer message = ByteBuffer.allocate(1); TPlacementPreference placementPreference = new TPlacementPreference(); for (InetSocketAddress address : preferredNodes) { placementPreference.addToNodes(address.getAddress().getHostAddress()); } TTaskSpec task = new TTaskSpec("test task", placementPreference, message); // Create the scheduling request. List tasks = new ArrayList(); tasks.add(task); TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user); // Create a set of backends, including all of the preferred nodes and some extra nodes too. allBackends.add(new InetSocketAddress("3.4.5.6", 174)); for (InetSocketAddress node : preferredNodes) { allBackends.add(node); } allBackends.add(new InetSocketAddress("234.5.6.7", 22)); allBackends.add(new InetSocketAddress("9.8.7.6", 1)); for (int i = 0; i < ITERATIONS; ++i) { Map requests = taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID, allBackends, SCHEDULER_ADDRESS); sanityCheckRequests(requests, 2); } } /** * Creates a scheduling request with 3 tasks, and sanity checks the result of * getEnqueueTaskReservationsRequests() */ @Test public void testMultipleTasks() { TSchedulingRequest schedulingRequest = generateSchedulingRequests(); for (int i = 0; i < ITERATIONS; ++i) { ConstrainedTaskPlacer taskPlacer = new ConstrainedTaskPlacer(REQUEST_ID, 2); Map requests = taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID, allBackends, SCHEDULER_ADDRESS); sanityCheckRequests(requests, 6); sanityCheckGetTasksAndCancellation(schedulingRequest, taskPlacer, requests); } } private void sanityCheckGetTasksAndCancellation( TSchedulingRequest schedulingRequest, ConstrainedTaskPlacer taskPlacer, Map requests) { Set taskIds = new HashSet(); for (TTaskSpec task : schedulingRequest.tasks) { taskIds.add(task.taskId); } // Now try to get the three tasks. Set unlaunchedTaskIds = new HashSet(taskIds); int numGetTasks = 0; Set cancellations = null; for (Entry entry : requests.entrySet()) { // For each entry, try to assign the tasks. Once all tasks have been assigned, cancel the // remaining reservations. THostPort hostPort = Network.socketAddressToThrift(entry.getKey()); // If the request has been cancelled, remove the current node monitor from the // cancellations set, so we can check at the end that the cancellations set is empty to // ensure that the cancellations returned were correct. if (cancellations != null) { assertTrue(cancellations.contains(hostPort)); cancellations.remove(hostPort); } for (int taskIndex = 0; taskIndex < entry.getValue().numTasks; taskIndex++) { ++numGetTasks; List specs = taskPlacer.assignTask(hostPort); assertTrue(specs != null); if (numGetTasks == 0) { // If this is the first attempt, we should definitely get a task. assertEquals(specs.size(), 1); } if (specs.size() == 1) { assertTrue("assignTask() returned a task after all tasks were launched!", unlaunchedTaskIds.size() > 0); TTaskLaunchSpec spec = specs.get(0); assertTrue(spec != null); assertTrue(unlaunchedTaskIds.contains(spec.getTaskId())); unlaunchedTaskIds.remove(spec.getTaskId()); } // If all of the tasks have been launched, cancel the outstanding ones. if (unlaunchedTaskIds.size() == 0 && cancellations == null) { assertTrue(taskPlacer.allTasksPlaced()); cancellations = new HashSet( taskPlacer.getOutstandingNodeMonitorsForCancellation()); assertTrue(cancellations.size() > 0); // If not all of the reservations at the current node monitor have been replied to yet, // there should be a cancellation for the current node monitor. if (taskIndex < entry.getValue().numTasks - 1) { assertTrue(cancellations.contains(hostPort)); cancellations.remove(hostPort); } // Another cancellation should lead to no outstanding node monitors. Set secondCancellations = new HashSet( taskPlacer.getOutstandingNodeMonitorsForCancellation()); assertEquals(secondCancellations.size(), 0); // Keep going after the cancellation, since this can happen if a getTask() is in flight // when the original cancellation occurs. } } } } /** * Creates a scheduling request with 3 constrained tasks and 1 unconstrained task, and sanity * checks the result of getEnqueueTaskReservationsRequests(). Then verifies the result of * assignTask(). */ @Test public void testConstrainedAndUnconstrainedTasks() { List preferredNodes = new ArrayList(); preferredNodes.add(new InetSocketAddress("123.4.5.6", 1)); preferredNodes.add(new InetSocketAddress("3.4.5.6", 56)); preferredNodes.add(new InetSocketAddress("4.2.3.67", 89)); preferredNodes.add(new InetSocketAddress("4.1.23.45", 100)); preferredNodes.add(new InetSocketAddress("9.0.0.0", 204)); // Create 3 tasks with overlapping placement preferences (all tasks include nodes[2] in their // placement preferences). ByteBuffer message = ByteBuffer.allocate(1); List tasks = new ArrayList(); final int NUM_TASKS = 3; Set constrainedTaskIds = new HashSet(); for (int i = 0; i < NUM_TASKS; ++i) { TPlacementPreference placementPreference = new TPlacementPreference(); for (int j = i; j < i + 3; ++j) { placementPreference.addToNodes(preferredNodes.get(j).getAddress().getHostAddress()); } String id = "constrained test task " + i; constrainedTaskIds.add(id); tasks.add(new TTaskSpec(id, placementPreference, message)); } String unconstrainedTaskId = "unconstrained test task"; tasks.add(new TTaskSpec(unconstrainedTaskId, null, message)); TUserGroupInfo user = new TUserGroupInfo(USER, GROUP, PRIORITY); TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user); // Create list of available backend nodes, with some additional nodes in additional to the // preferred ones. List backendNodes = new ArrayList(preferredNodes); backendNodes.add(new InetSocketAddress("1.2.3.4", 345)); backendNodes.add(new InetSocketAddress("5.6.7.81", 2000)); for (int i = 0; i < ITERATIONS; ++i) { ConstrainedTaskPlacer taskPlacer = new ConstrainedTaskPlacer(REQUEST_ID, 2); Map requests = taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID, backendNodes, SCHEDULER_ADDRESS); // Sanity check the list of requests. int totalEnqueuedTasks = 0; /* Number of requests not in the list of preferred nodes (expect at most 2, corresponding * to the two reservations for the unconstrained task). */ int nonPreferredNodes = 0; for (Entry entry : requests.entrySet()) { if (!preferredNodes.contains(entry.getKey())) { nonPreferredNodes++; assertTrue("Expect at most two entrys to be outside the set of preferred nodes", nonPreferredNodes <= 2); } TEnqueueTaskReservationsRequest request = entry.getValue(); assertEquals(request.getAppId(), APP_ID); assertEquals(request.getUser(), user); assertEquals(request.getRequestId(), REQUEST_ID); assertEquals(request.getSchedulerAddress(), SCHEDULER_ADDRESS); assertTrue(request.getNumTasks() > 0); totalEnqueuedTasks += request.getNumTasks(); } // Expect two choices for each of the 4 tasks. assertEquals(totalEnqueuedTasks, 8); sanityCheckGetTasksAndCancellation(schedulingRequest, taskPlacer, requests); } } } ================================================ FILE: src/test/java/edu/berkeley/sparrow/daemon/scheduler/TestUnconstrainedTaskPlacer.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.scheduler; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import org.apache.log4j.BasicConfigurator; import org.junit.Before; import org.junit.Test; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import edu.berkeley.sparrow.thrift.TEnqueueTaskReservationsRequest; import edu.berkeley.sparrow.thrift.THostPort; import edu.berkeley.sparrow.thrift.TPlacementPreference; import edu.berkeley.sparrow.thrift.TSchedulingRequest; import edu.berkeley.sparrow.thrift.TTaskLaunchSpec; import edu.berkeley.sparrow.thrift.TTaskSpec; import edu.berkeley.sparrow.thrift.TUserGroupInfo; public class TestUnconstrainedTaskPlacer { private static final String APP_ID = "test app"; private static final String USER = "user"; private static final String GROUP = "group"; private static final int PRIORITY = 0; private static final String REQUEST_ID = "request id"; private static final THostPort SCHEDULER_ADDRESS = new THostPort("localhost", 12345); private static final int NUM_TASKS = 2; private static final double PROBE_RATIO = 1.5; private static TUserGroupInfo user = new TUserGroupInfo(USER, GROUP, PRIORITY); private static List tasks; Set taskIds; private static List backendNodes; @Before public void setUp() throws Exception { // Set up a simple configuration that logs on the console. BasicConfigurator.configure(); tasks = Lists.newArrayList(); taskIds = Sets.newHashSet(); ByteBuffer message = ByteBuffer.allocate(1); TPlacementPreference placementPreference = new TPlacementPreference(); for (int i = 0; i < NUM_TASKS; ++i) { String id = "test task " + i; taskIds.add(id); tasks.add(new TTaskSpec(id, placementPreference, message)); } backendNodes = Lists.newArrayList(); backendNodes.add(new InetSocketAddress("3.4.5.6", 174)); backendNodes.add(new InetSocketAddress("127.124.0.1", 22)); backendNodes.add(new InetSocketAddress("123.4.5.6", 20000)); backendNodes.add(new InetSocketAddress("7.0.0.9", 45)); backendNodes.add(new InetSocketAddress("234.5.6.7", 22)); backendNodes.add(new InetSocketAddress("9.8.7.6", 1)); } @Test public void enqueueTaskReservationsWithMoreReservationsThanNodes() { final double PROBE_RATIO = 2; final int NUM_TASKS = 14; ByteBuffer message = ByteBuffer.allocate(1); TPlacementPreference placementPreference = new TPlacementPreference(); while (tasks.size() < NUM_TASKS) { String id = "test task " + tasks.size(); taskIds.add(id); tasks.add(new TTaskSpec(id, placementPreference, message)); } TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user); final int NUM_ITERATIONS = 100; for (int i = 0; i < NUM_ITERATIONS; ++i) { UnconstrainedTaskPlacer taskPlacer = new UnconstrainedTaskPlacer(REQUEST_ID, PROBE_RATIO); Map requests = taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID, backendNodes, SCHEDULER_ADDRESS); // Sanity check the list of requests. final int EXPECTED_RESERVATIONS = 28; int reservationsCount = 0; for (Entry entry : requests.entrySet()) { // The node monitor the request is being sent to should be among the list of backend nodes. assertTrue("Expect " + entry.getKey() + " to be among the set of backend nodes", backendNodes.contains(entry.getKey())); TEnqueueTaskReservationsRequest request = entry.getValue(); assertEquals(request.getAppId(), APP_ID); assertEquals(request.getUser(), user); assertEquals(request.getRequestId(), REQUEST_ID); assertEquals(request.getSchedulerAddress(), SCHEDULER_ADDRESS); // Expect the reservations to be evenly balanced over the machines. assertTrue(request.getNumTasks() == 4 || request.getNumTasks() == 5); reservationsCount += request.getNumTasks(); } assertEquals(reservationsCount, EXPECTED_RESERVATIONS); } } /** * Calls getEnqueueTaskReservations() for two tasks, with 6 possible backend nodes, and ensures * that the reservations returned are for distinct nodes in the set of backends. */ @Test public void sanityCheckEnqueueTaskReservations() { TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user); final int NUM_ITERATIONS = 100; for (int i = 0; i < NUM_ITERATIONS; ++i) { UnconstrainedTaskPlacer taskPlacer = new UnconstrainedTaskPlacer(REQUEST_ID, PROBE_RATIO); Map requests = taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID, backendNodes, SCHEDULER_ADDRESS); // Sanity check the list of requests. final int EXPECTED_REQUESTS = 3; assertEquals(EXPECTED_REQUESTS, requests.size()); for (Entry entry : requests.entrySet()) { // The node monitor the request is being sent to should be among the list of backend nodes. assertTrue("Expect " + entry.getKey() + " to be among the set of backend nodes", backendNodes.contains(entry.getKey())); TEnqueueTaskReservationsRequest request = entry.getValue(); assertEquals(request.getAppId(), APP_ID); assertEquals(request.getUser(), user); assertEquals(request.getRequestId(), REQUEST_ID); assertEquals(request.getSchedulerAddress(), SCHEDULER_ADDRESS); assertEquals(1, request.getNumTasks()); } } } /** * First, calls getEnqueueTaskReservationsRequests() for a job with two tasks. Then, calls * assignTasks() for the backends returned by getEnqueueTaskReservationsRequests() and ensures * that the tasks returned are consistent with the original scheduling request. */ @Test public void testAssignTask() { TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user); final int numIterations = 100; final int expectedReservations = 3; for (int i = 0; i < numIterations; ++i) { UnconstrainedTaskPlacer taskPlacer = new UnconstrainedTaskPlacer(REQUEST_ID, PROBE_RATIO); Map requests = taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID, backendNodes, SCHEDULER_ADDRESS); // Now try to get tasks, and ensure that the task placer will return exactly 2 tasks. List nodes = Lists.newArrayList(requests.keySet()); assertEquals(nodes.size(), expectedReservations); Collections.shuffle(nodes); Set taskIdsCopy = Sets.newHashSet(taskIds); for (int j = 0; j < expectedReservations; ++j) { THostPort hostPort = new THostPort(nodes.get(j).getHostName(), nodes.get(j).getPort()); List specs = taskPlacer.assignTask(hostPort); assertTrue(specs != null); if (j < NUM_TASKS) { assertEquals(specs.size(), 1); TTaskLaunchSpec spec = specs.get(0); assertTrue("Expect to receive a task spec for task " + j + " at " + hostPort.getHost() + ":" + hostPort.getPort(), spec != null); assertTrue("Expect list of unlaunched tasks to contain " + spec.getTaskId(), taskIdsCopy.contains(spec.getTaskId())); taskIdsCopy.remove(spec.getTaskId()); } else { assertEquals(specs.size(), 0); } } } } /** * Verifies that allTasksPlaced() works correctly by first calling * getEnqueueTaskReservationsRequests() for a job with two tasks. Then, dovetails calls to * assignTasks() to calls of allTasksPlaced() to ensure that allTasksPlaced() returns * the correct answer. */ @Test public void testAllTasksPlaced() { TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user); final int numIterations = 100; final int expectedReservations = 3; for (int i = 0; i < numIterations; ++i) { UnconstrainedTaskPlacer taskPlacer = new UnconstrainedTaskPlacer(REQUEST_ID, PROBE_RATIO); Map requests = taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID, backendNodes, SCHEDULER_ADDRESS); // Now try to get tasks, and ensure that the task placer will return exactly 2 tasks. List nodes = Lists.newArrayList(requests.keySet()); assertEquals(nodes.size(), expectedReservations); Collections.shuffle(nodes); Set taskIdsCopy = Sets.newHashSet(taskIds); for (int j = 0; j < expectedReservations; ++j) { if (j < NUM_TASKS) { assertTrue(!taskPlacer.allTasksPlaced()); } THostPort hostPort = new THostPort(nodes.get(j).getHostName(), nodes.get(j).getPort()); List specs = taskPlacer.assignTask(hostPort); assertTrue(specs != null); if (j < NUM_TASKS) { assertEquals(1, specs.size()); TTaskLaunchSpec spec = specs.get(0); assertTrue("Expect to receive a task spec for task " + j + " at " + hostPort.getHost() + ":" + hostPort.getPort(), spec != null); assertTrue("Expect list of unlaunched tasks to contain " + spec.getTaskId(), taskIdsCopy.contains(spec.getTaskId())); taskIdsCopy.remove(spec.getTaskId()); } else { assertTrue(taskPlacer.allTasksPlaced()); assertEquals(0, specs.size()); } } } } @Test public void testCancellation() { TSchedulingRequest schedulingRequest = new TSchedulingRequest(APP_ID, tasks, user); final int numIterations = 100; for (int i = 0; i < numIterations; ++i) { UnconstrainedTaskPlacer taskPlacer = new UnconstrainedTaskPlacer(REQUEST_ID, PROBE_RATIO); Map requests = taskPlacer.getEnqueueTaskReservationsRequests(schedulingRequest, REQUEST_ID, backendNodes, SCHEDULER_ADDRESS); List nodes = Lists.newArrayList(requests.keySet()); for (int taskIndex = 0; taskIndex < NUM_TASKS; ++taskIndex) { THostPort hostPort = new THostPort(nodes.get(0).getAddress().getHostAddress(), nodes.get(0).getPort()); nodes.remove(0); taskPlacer.assignTask(hostPort); } // Get the node monitors that should be cancelled. At this point, the remaining entries in // nodes should be the set of nodes where requests should be cancelled. Set remainingNodeMonitors = taskPlacer.getOutstandingNodeMonitorsForCancellation(); assertEquals(nodes.size(), remainingNodeMonitors.size()); for (InetSocketAddress node : nodes) { THostPort hostPort = new THostPort(node.getAddress().getHostAddress(), node.getPort()); assertTrue(remainingNodeMonitors.contains(hostPort)); } // Trying to get the outstanding NMs for cancellation again should return an empty set. assertEquals(0, taskPlacer.getOutstandingNodeMonitorsForCancellation().size()); } } } ================================================ FILE: src/test/java/edu/berkeley/sparrow/daemon/util/TestThriftClientPool.java ================================================ /* * Copyright 2013 The Regents of The University California * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.berkeley.sparrow.daemon.util; import static org.junit.Assert.*; import static org.mockito.Mockito.*; import java.net.InetSocketAddress; import org.apache.commons.pool.impl.GenericKeyedObjectPool.Config; import org.apache.thrift.async.TAsyncClient; import org.apache.thrift.async.TAsyncClientManager; import org.apache.thrift.protocol.TProtocolFactory; import org.apache.thrift.transport.TNonblockingTransport; import org.junit.Test; import edu.berkeley.sparrow.daemon.util.ThriftClientPool.MakerFactory; public class TestThriftClientPool { private class MockedMakerFactory implements MakerFactory { @Override public TAsyncClient create(TNonblockingTransport tr, TAsyncClientManager mgr, TProtocolFactory factory) { return mock(TAsyncClient.class); } } /** Test a very common scenario where we make two thrift function calls to the same node in rapid succession. This test ensures that a single client is created and used for both calls. */ @Test public void ensureConnectionReUsed() throws Exception { InetSocketAddress sock = new InetSocketAddress(12345); ThriftClientPool pool = new ThriftClientPool( new MockedMakerFactory()); assertEquals(0, pool.getNumIdle(sock)); assertEquals(0, pool.getNumActive(sock)); TAsyncClient client1 = pool.borrowClient(sock); assertEquals(0, pool.getNumIdle(sock)); assertEquals(1, pool.getNumActive(sock)); pool.returnClient(sock, client1); assertEquals(1, pool.getNumIdle(sock)); assertEquals(0, pool.getNumActive(sock)); TAsyncClient client2 = pool.borrowClient(sock); assertEquals(0, pool.getNumIdle(sock)); assertEquals(1, pool.getNumActive(sock)); assertEquals(client1, client2); } @Test public void testPoolExpiration() throws Exception { // Makes sure that a thrift client gets evicted (and therefore closed) if it is not // used for a certain amount of time. Config conf = ThriftClientPool.getPoolConfig(); // We decrease the defaults here so the test runs in reasonable time conf.minEvictableIdleTimeMillis = 10; conf.timeBetweenEvictionRunsMillis = 50; InetSocketAddress sock = new InetSocketAddress(12345); ThriftClientPool pool = new ThriftClientPool( new MockedMakerFactory(), conf); assertEquals(0, pool.getNumIdle(sock)); assertEquals(0, pool.getNumActive(sock)); TAsyncClient client = pool.borrowClient(sock); assertEquals(0, pool.getNumIdle(sock)); assertEquals(1, pool.getNumActive(sock)); pool.returnClient(sock, client); assertEquals(1, pool.getNumIdle(sock)); assertEquals(0, pool.getNumActive(sock)); Thread.sleep(conf.timeBetweenEvictionRunsMillis * 2); assertEquals(0, pool.getNumIdle(sock)); assertEquals(0, pool.getNumActive(sock)); } } ================================================ FILE: upload.py ================================================ #!/usr/bin/env python # coding: utf-8 # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Tool for uploading diffs from a version control system to the codereview app. Usage summary: upload.py [options] [-- diff_options] [path...] Diff options are passed to the diff command of the underlying system. Supported version control systems: Git Mercurial Subversion Perforce CVS It is important for Git/Mercurial users to specify a tree/node/branch to diff against by using the '--rev' option. """ # This code is derived from appcfg.py in the App Engine SDK (open source), # and from ASPN recipe #146306. import ConfigParser import cookielib import errno import fnmatch import getpass import logging import marshal import mimetypes import optparse import os import re import socket import subprocess import sys import urllib import urllib2 import urlparse # The md5 module was deprecated in Python 2.5. try: from hashlib import md5 except ImportError: from md5 import md5 try: import readline except ImportError: pass try: import keyring except ImportError: keyring = None # The logging verbosity: # 0: Errors only. # 1: Status messages. # 2: Info logs. # 3: Debug logs. verbosity = 1 # The account type used for authentication. # This line could be changed by the review server (see handler for # upload.py). AUTH_ACCOUNT_TYPE = "GOOGLE" # URL of the default review server. As for AUTH_ACCOUNT_TYPE, this line could be # changed by the review server (see handler for upload.py). DEFAULT_REVIEW_SERVER = "codereview.appspot.com" # Max size of patch or base file. MAX_UPLOAD_SIZE = 900 * 1024 # Constants for version control names. Used by GuessVCSName. VCS_GIT = "Git" VCS_MERCURIAL = "Mercurial" VCS_SUBVERSION = "Subversion" VCS_PERFORCE = "Perforce" VCS_CVS = "CVS" VCS_UNKNOWN = "Unknown" VCS_ABBREVIATIONS = { VCS_MERCURIAL.lower(): VCS_MERCURIAL, "hg": VCS_MERCURIAL, VCS_SUBVERSION.lower(): VCS_SUBVERSION, "svn": VCS_SUBVERSION, VCS_PERFORCE.lower(): VCS_PERFORCE, "p4": VCS_PERFORCE, VCS_GIT.lower(): VCS_GIT, VCS_CVS.lower(): VCS_CVS, } # The result of parsing Subversion's [auto-props] setting. svn_auto_props_map = None def GetEmail(prompt): """Prompts the user for their email address and returns it. The last used email address is saved to a file and offered up as a suggestion to the user. If the user presses enter without typing in anything the last used email address is used. If the user enters a new address, it is saved for next time we prompt. """ last_email_file_name = os.path.expanduser("~/.last_codereview_email_address") last_email = "" if os.path.exists(last_email_file_name): try: last_email_file = open(last_email_file_name, "r") last_email = last_email_file.readline().strip("\n") last_email_file.close() prompt += " [%s]" % last_email except IOError, e: pass email = raw_input(prompt + ": ").strip() if email: try: last_email_file = open(last_email_file_name, "w") last_email_file.write(email) last_email_file.close() except IOError, e: pass else: email = last_email return email def StatusUpdate(msg): """Print a status message to stdout. If 'verbosity' is greater than 0, print the message. Args: msg: The string to print. """ if verbosity > 0: print msg def ErrorExit(msg): """Print an error message to stderr and exit.""" print >>sys.stderr, msg sys.exit(1) class ClientLoginError(urllib2.HTTPError): """Raised to indicate there was an error authenticating with ClientLogin.""" def __init__(self, url, code, msg, headers, args): urllib2.HTTPError.__init__(self, url, code, msg, headers, None) self.args = args self._reason = args["Error"] self.info = args.get("Info", None) @property def reason(self): # reason is a property on python 2.7 but a member variable on <=2.6. # self.args is modified so it cannot be used as-is so save the value in # self._reason. return self._reason class AbstractRpcServer(object): """Provides a common interface for a simple RPC server.""" def __init__(self, host, auth_function, host_override=None, extra_headers={}, save_cookies=False, account_type=AUTH_ACCOUNT_TYPE): """Creates a new AbstractRpcServer. Args: host: The host to send requests to. auth_function: A function that takes no arguments and returns an (email, password) tuple when called. Will be called if authentication is required. host_override: The host header to send to the server (defaults to host). extra_headers: A dict of extra headers to append to every request. save_cookies: If True, save the authentication cookies to local disk. If False, use an in-memory cookiejar instead. Subclasses must implement this functionality. Defaults to False. account_type: Account type used for authentication. Defaults to AUTH_ACCOUNT_TYPE. """ self.host = host if (not self.host.startswith("http://") and not self.host.startswith("https://")): self.host = "http://" + self.host self.host_override = host_override self.auth_function = auth_function self.authenticated = False self.extra_headers = extra_headers self.save_cookies = save_cookies self.account_type = account_type self.opener = self._GetOpener() if self.host_override: logging.info("Server: %s; Host: %s", self.host, self.host_override) else: logging.info("Server: %s", self.host) def _GetOpener(self): """Returns an OpenerDirector for making HTTP requests. Returns: A urllib2.OpenerDirector object. """ raise NotImplementedError() def _CreateRequest(self, url, data=None): """Creates a new urllib request.""" logging.debug("Creating request for: '%s' with payload:\n%s", url, data) req = urllib2.Request(url, data=data, headers={"Accept": "text/plain"}) if self.host_override: req.add_header("Host", self.host_override) for key, value in self.extra_headers.iteritems(): req.add_header(key, value) return req def _GetAuthToken(self, email, password): """Uses ClientLogin to authenticate the user, returning an auth token. Args: email: The user's email address password: The user's password Raises: ClientLoginError: If there was an error authenticating with ClientLogin. HTTPError: If there was some other form of HTTP error. Returns: The authentication token returned by ClientLogin. """ account_type = self.account_type if self.host.endswith(".google.com"): # Needed for use inside Google. account_type = "HOSTED" req = self._CreateRequest( url="https://www.google.com/accounts/ClientLogin", data=urllib.urlencode({ "Email": email, "Passwd": password, "service": "ah", "source": "rietveld-codereview-upload", "accountType": account_type, }), ) try: response = self.opener.open(req) response_body = response.read() response_dict = dict(x.split("=") for x in response_body.split("\n") if x) return response_dict["Auth"] except urllib2.HTTPError, e: if e.code == 403: body = e.read() response_dict = dict(x.split("=", 1) for x in body.split("\n") if x) raise ClientLoginError(req.get_full_url(), e.code, e.msg, e.headers, response_dict) else: raise def _GetAuthCookie(self, auth_token): """Fetches authentication cookies for an authentication token. Args: auth_token: The authentication token returned by ClientLogin. Raises: HTTPError: If there was an error fetching the authentication cookies. """ # This is a dummy value to allow us to identify when we're successful. continue_location = "http://localhost/" args = {"continue": continue_location, "auth": auth_token} req = self._CreateRequest("%s/_ah/login?%s" % (self.host, urllib.urlencode(args))) try: response = self.opener.open(req) except urllib2.HTTPError, e: response = e if (response.code != 302 or response.info()["location"] != continue_location): raise urllib2.HTTPError(req.get_full_url(), response.code, response.msg, response.headers, response.fp) self.authenticated = True def _Authenticate(self): """Authenticates the user. The authentication process works as follows: 1) We get a username and password from the user 2) We use ClientLogin to obtain an AUTH token for the user (see http://code.google.com/apis/accounts/AuthForInstalledApps.html). 3) We pass the auth token to /_ah/login on the server to obtain an authentication cookie. If login was successful, it tries to redirect us to the URL we provided. If we attempt to access the upload API without first obtaining an authentication cookie, it returns a 401 response (or a 302) and directs us to authenticate ourselves with ClientLogin. """ for i in range(3): credentials = self.auth_function() try: auth_token = self._GetAuthToken(credentials[0], credentials[1]) except ClientLoginError, e: print >>sys.stderr, '' if e.reason == "BadAuthentication": if e.info == "InvalidSecondFactor": print >>sys.stderr, ( "Use an application-specific password instead " "of your regular account password.\n" "See http://www.google.com/" "support/accounts/bin/answer.py?answer=185833") else: print >>sys.stderr, "Invalid username or password." elif e.reason == "CaptchaRequired": print >>sys.stderr, ( "Please go to\n" "https://www.google.com/accounts/DisplayUnlockCaptcha\n" "and verify you are a human. Then try again.\n" "If you are using a Google Apps account the URL is:\n" "https://www.google.com/a/yourdomain.com/UnlockCaptcha") elif e.reason == "NotVerified": print >>sys.stderr, "Account not verified." elif e.reason == "TermsNotAgreed": print >>sys.stderr, "User has not agreed to TOS." elif e.reason == "AccountDeleted": print >>sys.stderr, "The user account has been deleted." elif e.reason == "AccountDisabled": print >>sys.stderr, "The user account has been disabled." break elif e.reason == "ServiceDisabled": print >>sys.stderr, ("The user's access to the service has been " "disabled.") elif e.reason == "ServiceUnavailable": print >>sys.stderr, "The service is not available; try again later." else: # Unknown error. raise print >>sys.stderr, '' continue self._GetAuthCookie(auth_token) return def Send(self, request_path, payload=None, content_type="application/octet-stream", timeout=None, extra_headers=None, **kwargs): """Sends an RPC and returns the response. Args: request_path: The path to send the request to, eg /api/appversion/create. payload: The body of the request, or None to send an empty request. content_type: The Content-Type header to use. timeout: timeout in seconds; default None i.e. no timeout. (Note: for large requests on OS X, the timeout doesn't work right.) extra_headers: Dict containing additional HTTP headers that should be included in the request (string header names mapped to their values), or None to not include any additional headers. kwargs: Any keyword arguments are converted into query string parameters. Returns: The response body, as a string. """ # TODO: Don't require authentication. Let the server say # whether it is necessary. if not self.authenticated: self._Authenticate() old_timeout = socket.getdefaulttimeout() socket.setdefaulttimeout(timeout) try: tries = 0 while True: tries += 1 args = dict(kwargs) url = "%s%s" % (self.host, request_path) if args: url += "?" + urllib.urlencode(args) req = self._CreateRequest(url=url, data=payload) req.add_header("Content-Type", content_type) if extra_headers: for header, value in extra_headers.items(): req.add_header(header, value) try: f = self.opener.open(req) response = f.read() f.close() return response except urllib2.HTTPError, e: if tries > 3: raise elif e.code == 401 or e.code == 302: self._Authenticate() elif e.code == 301: # Handle permanent redirect manually. url = e.info()["location"] url_loc = urlparse.urlparse(url) self.host = '%s://%s' % (url_loc[0], url_loc[1]) elif e.code >= 500: ErrorExit(e.read()) else: raise finally: socket.setdefaulttimeout(old_timeout) class HttpRpcServer(AbstractRpcServer): """Provides a simplified RPC-style interface for HTTP requests.""" def _Authenticate(self): """Save the cookie jar after authentication.""" super(HttpRpcServer, self)._Authenticate() if self.save_cookies: StatusUpdate("Saving authentication cookies to %s" % self.cookie_file) self.cookie_jar.save() def _GetOpener(self): """Returns an OpenerDirector that supports cookies and ignores redirects. Returns: A urllib2.OpenerDirector object. """ opener = urllib2.OpenerDirector() opener.add_handler(urllib2.ProxyHandler()) opener.add_handler(urllib2.UnknownHandler()) opener.add_handler(urllib2.HTTPHandler()) opener.add_handler(urllib2.HTTPDefaultErrorHandler()) opener.add_handler(urllib2.HTTPSHandler()) opener.add_handler(urllib2.HTTPErrorProcessor()) if self.save_cookies: self.cookie_file = os.path.expanduser("~/.codereview_upload_cookies") self.cookie_jar = cookielib.MozillaCookieJar(self.cookie_file) if os.path.exists(self.cookie_file): try: self.cookie_jar.load() self.authenticated = True StatusUpdate("Loaded authentication cookies from %s" % self.cookie_file) except (cookielib.LoadError, IOError): # Failed to load cookies - just ignore them. pass else: # Create an empty cookie file with mode 600 fd = os.open(self.cookie_file, os.O_CREAT, 0600) os.close(fd) # Always chmod the cookie file os.chmod(self.cookie_file, 0600) else: # Don't save cookies across runs of update.py. self.cookie_jar = cookielib.CookieJar() opener.add_handler(urllib2.HTTPCookieProcessor(self.cookie_jar)) return opener class CondensedHelpFormatter(optparse.IndentedHelpFormatter): """Frees more horizontal space by removing indentation from group options and collapsing arguments between short and long, e.g. '-o ARG, --opt=ARG' to -o --opt ARG""" def format_heading(self, heading): return "%s:\n" % heading def format_option(self, option): self.dedent() res = optparse.HelpFormatter.format_option(self, option) self.indent() return res def format_option_strings(self, option): self.set_long_opt_delimiter(" ") optstr = optparse.HelpFormatter.format_option_strings(self, option) optlist = optstr.split(", ") if len(optlist) > 1: if option.takes_value(): # strip METAVAR from all but the last option optlist = [x.split()[0] for x in optlist[:-1]] + optlist[-1:] optstr = " ".join(optlist) return optstr parser = optparse.OptionParser( usage="%prog [options] [-- diff_options] [path...]", add_help_option=False, formatter=CondensedHelpFormatter() ) parser.add_option("-h", "--help", action="store_true", help="Show this help message and exit.") parser.add_option("-y", "--assume_yes", action="store_true", dest="assume_yes", default=False, help="Assume that the answer to yes/no questions is 'yes'.") # Logging group = parser.add_option_group("Logging options") group.add_option("-q", "--quiet", action="store_const", const=0, dest="verbose", help="Print errors only.") group.add_option("-v", "--verbose", action="store_const", const=2, dest="verbose", default=1, help="Print info level logs.") group.add_option("--noisy", action="store_const", const=3, dest="verbose", help="Print all logs.") group.add_option("--print_diffs", dest="print_diffs", action="store_true", help="Print full diffs.") # Review server group = parser.add_option_group("Review server options") group.add_option("-s", "--server", action="store", dest="server", default=DEFAULT_REVIEW_SERVER, metavar="SERVER", help=("The server to upload to. The format is host[:port]. " "Defaults to '%default'.")) group.add_option("-e", "--email", action="store", dest="email", metavar="EMAIL", default=None, help="The username to use. Will prompt if omitted.") group.add_option("-H", "--host", action="store", dest="host", metavar="HOST", default=None, help="Overrides the Host header sent with all RPCs.") group.add_option("--no_cookies", action="store_false", dest="save_cookies", default=True, help="Do not save authentication cookies to local disk.") group.add_option("--account_type", action="store", dest="account_type", metavar="TYPE", default=AUTH_ACCOUNT_TYPE, choices=["GOOGLE", "HOSTED"], help=("Override the default account type " "(defaults to '%default', " "valid choices are 'GOOGLE' and 'HOSTED').")) # Issue group = parser.add_option_group("Issue options") group.add_option("-t", "--title", action="store", dest="title", help="New issue subject or new patch set title") group.add_option("-m", "--message", action="store", dest="message", default=None, help="New issue description or new patch set message") group.add_option("-F", "--file", action="store", dest="file", default=None, help="Read the message above from file.") group.add_option("-r", "--reviewers", action="store", dest="reviewers", metavar="REVIEWERS", default="keo@eecs.berkeley.edu,pwendell@gmail.com", help="Add reviewers (comma separated email addresses).") group.add_option("--cc", action="store", dest="cc", metavar="CC", default=None, help="Add CC (comma separated email addresses).") group.add_option("--private", action="store_true", dest="private", default=True, help="Make the issue restricted to reviewers and those CCed") # Upload options group = parser.add_option_group("Patch options") group.add_option("-i", "--issue", type="int", action="store", metavar="ISSUE", default=None, help="Issue number to which to add. Defaults to new issue.") group.add_option("--base_url", action="store", dest="base_url", default=None, help="Base URL path for files (listed as \"Base URL\" when " "viewing issue). If omitted, will be guessed automatically " "for SVN repos and left blank for others.") group.add_option("--download_base", action="store_true", dest="download_base", default=False, help="Base files will be downloaded by the server " "(side-by-side diffs may not work on files with CRs).") group.add_option("--rev", action="store", dest="revision", metavar="REV", default=None, help="Base revision/branch/tree to diff against. Use " "rev1:rev2 range to review already committed changeset.") group.add_option("--send_mail", action="store_true", dest="send_mail", default=True, help="Send notification email to reviewers.") group.add_option("-p", "--send_patch", action="store_true", dest="send_patch", default=False, help="Same as --send_mail, but include diff as an " "attachment, and prepend email subject with 'PATCH:'.") group.add_option("--vcs", action="store", dest="vcs", metavar="VCS", default=None, help=("Version control system (optional, usually upload.py " "already guesses the right VCS).")) group.add_option("--emulate_svn_auto_props", action="store_true", dest="emulate_svn_auto_props", default=False, help=("Emulate Subversion's auto properties feature.")) # Git-specific group = parser.add_option_group("Git-specific options") group.add_option("--git_similarity", action="store", dest="git_similarity", metavar="SIM", type="int", default=50, help=("Set the minimum similarity index for detecting renames " "and copies. See `git diff -C`. (default 50).")) group.add_option("--git_no_find_copies", action="store_false", default=True, dest="git_find_copies", help=("Prevents git from looking for copies (default off).")) # Perforce-specific group = parser.add_option_group("Perforce-specific options " "(overrides P4 environment variables)") group.add_option("--p4_port", action="store", dest="p4_port", metavar="P4_PORT", default=None, help=("Perforce server and port (optional)")) group.add_option("--p4_changelist", action="store", dest="p4_changelist", metavar="P4_CHANGELIST", default=None, help=("Perforce changelist id")) group.add_option("--p4_client", action="store", dest="p4_client", metavar="P4_CLIENT", default=None, help=("Perforce client/workspace")) group.add_option("--p4_user", action="store", dest="p4_user", metavar="P4_USER", default=None, help=("Perforce user")) class KeyringCreds(object): def __init__(self, server, host, email): self.server = server self.host = host self.email = email self.accounts_seen = set() def GetUserCredentials(self): """Prompts the user for a username and password. Only use keyring on the initial call. If the keyring contains the wrong password, we want to give the user a chance to enter another one. """ # Create a local alias to the email variable to avoid Python's crazy # scoping rules. global keyring email = self.email if email is None: email = GetEmail("Email (login for uploading to %s)" % self.server) password = None if keyring and not email in self.accounts_seen: try: password = keyring.get_password(self.host, email) except: # Sadly, we have to trap all errors here as # gnomekeyring.IOError inherits from object. :/ print "Failed to get password from keyring" keyring = None if password is not None: print "Using password from system keyring." self.accounts_seen.add(email) else: password = getpass.getpass("Password for %s: " % email) if keyring: answer = raw_input("Store password in system keyring?(y/N) ").strip() if answer == "y": keyring.set_password(self.host, email, password) self.accounts_seen.add(email) return (email, password) def GetRpcServer(server, email=None, host_override=None, save_cookies=True, account_type=AUTH_ACCOUNT_TYPE): """Returns an instance of an AbstractRpcServer. Args: server: String containing the review server URL. email: String containing user's email address. host_override: If not None, string containing an alternate hostname to use in the host header. save_cookies: Whether authentication cookies should be saved to disk. account_type: Account type for authentication, either 'GOOGLE' or 'HOSTED'. Defaults to AUTH_ACCOUNT_TYPE. Returns: A new HttpRpcServer, on which RPC calls can be made. """ # If this is the dev_appserver, use fake authentication. host = (host_override or server).lower() if re.match(r'(http://)?localhost([:/]|$)', host): if email is None: email = "test@example.com" logging.info("Using debug user %s. Override with --email" % email) server = HttpRpcServer( server, lambda: (email, "password"), host_override=host_override, extra_headers={"Cookie": 'dev_appserver_login="%s:False"' % email}, save_cookies=save_cookies, account_type=account_type) # Don't try to talk to ClientLogin. server.authenticated = True return server return HttpRpcServer(server, KeyringCreds(server, host, email).GetUserCredentials, host_override=host_override, save_cookies=save_cookies, account_type=account_type) def EncodeMultipartFormData(fields, files): """Encode form fields for multipart/form-data. Args: fields: A sequence of (name, value) elements for regular form fields. files: A sequence of (name, filename, value) elements for data to be uploaded as files. Returns: (content_type, body) ready for httplib.HTTP instance. Source: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306 """ BOUNDARY = '-M-A-G-I-C---B-O-U-N-D-A-R-Y-' CRLF = '\r\n' lines = [] for (key, value) in fields: lines.append('--' + BOUNDARY) lines.append('Content-Disposition: form-data; name="%s"' % key) lines.append('') if isinstance(value, unicode): value = value.encode('utf-8') lines.append(value) for (key, filename, value) in files: lines.append('--' + BOUNDARY) lines.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (key, filename)) lines.append('Content-Type: %s' % GetContentType(filename)) lines.append('') if isinstance(value, unicode): value = value.encode('utf-8') lines.append(value) lines.append('--' + BOUNDARY + '--') lines.append('') body = CRLF.join(lines) content_type = 'multipart/form-data; boundary=%s' % BOUNDARY return content_type, body def GetContentType(filename): """Helper to guess the content-type from the filename.""" return mimetypes.guess_type(filename)[0] or 'application/octet-stream' # Use a shell for subcommands on Windows to get a PATH search. use_shell = sys.platform.startswith("win") def RunShellWithReturnCodeAndStderr(command, print_output=False, universal_newlines=True, env=os.environ): """Executes a command and returns the output from stdout, stderr and the return code. Args: command: Command to execute. print_output: If True, the output is printed to stdout. If False, both stdout and stderr are ignored. universal_newlines: Use universal_newlines flag (default: True). Returns: Tuple (stdout, stderr, return code) """ logging.info("Running %s", command) env = env.copy() env['LC_MESSAGES'] = 'C' p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=use_shell, universal_newlines=universal_newlines, env=env) if print_output: output_array = [] while True: line = p.stdout.readline() if not line: break print line.strip("\n") output_array.append(line) output = "".join(output_array) else: output = p.stdout.read() p.wait() errout = p.stderr.read() if print_output and errout: print >>sys.stderr, errout p.stdout.close() p.stderr.close() return output, errout, p.returncode def RunShellWithReturnCode(command, print_output=False, universal_newlines=True, env=os.environ): """Executes a command and returns the output from stdout and the return code.""" out, err, retcode = RunShellWithReturnCodeAndStderr(command, print_output, universal_newlines, env) return out, retcode def RunShell(command, silent_ok=False, universal_newlines=True, print_output=False, env=os.environ): data, retcode = RunShellWithReturnCode(command, print_output, universal_newlines, env) if retcode: ErrorExit("Got error status from %s:\n%s" % (command, data)) if not silent_ok and not data: ErrorExit("No output from %s" % command) return data class VersionControlSystem(object): """Abstract base class providing an interface to the VCS.""" def __init__(self, options): """Constructor. Args: options: Command line options. """ self.options = options def GetGUID(self): """Return string to distinguish the repository from others, for example to query all opened review issues for it""" raise NotImplementedError( "abstract method -- subclass %s must override" % self.__class__) def PostProcessDiff(self, diff): """Return the diff with any special post processing this VCS needs, e.g. to include an svn-style "Index:".""" return diff def GenerateDiff(self, args): """Return the current diff as a string. Args: args: Extra arguments to pass to the diff command. """ raise NotImplementedError( "abstract method -- subclass %s must override" % self.__class__) def GetUnknownFiles(self): """Return a list of files unknown to the VCS.""" raise NotImplementedError( "abstract method -- subclass %s must override" % self.__class__) def CheckForUnknownFiles(self): """Show an "are you sure?" prompt if there are unknown files.""" unknown_files = self.GetUnknownFiles() if unknown_files: print "The following files are not added to version control:" for line in unknown_files: print line prompt = "Are you sure to continue?(y/N) " answer = raw_input(prompt).strip() if answer != "y": ErrorExit("User aborted") def GetBaseFile(self, filename): """Get the content of the upstream version of a file. Returns: A tuple (base_content, new_content, is_binary, status) base_content: The contents of the base file. new_content: For text files, this is empty. For binary files, this is the contents of the new file, since the diff output won't contain information to reconstruct the current file. is_binary: True iff the file is binary. status: The status of the file. """ raise NotImplementedError( "abstract method -- subclass %s must override" % self.__class__) def GetBaseFiles(self, diff): """Helper that calls GetBase file for each file in the patch. Returns: A dictionary that maps from filename to GetBaseFile's tuple. Filenames are retrieved based on lines that start with "Index:" or "Property changes on:". """ files = {} for line in diff.splitlines(True): if line.startswith('Index:') or line.startswith('Property changes on:'): unused, filename = line.split(':', 1) # On Windows if a file has property changes its filename uses '\' # instead of '/'. filename = filename.strip().replace('\\', '/') files[filename] = self.GetBaseFile(filename) return files def UploadBaseFiles(self, issue, rpc_server, patch_list, patchset, options, files): """Uploads the base files (and if necessary, the current ones as well).""" def UploadFile(filename, file_id, content, is_binary, status, is_base): """Uploads a file to the server.""" file_too_large = False if is_base: type = "base" else: type = "current" if len(content) > MAX_UPLOAD_SIZE: print ("Not uploading the %s file for %s because it's too large." % (type, filename)) file_too_large = True content = "" checksum = md5(content).hexdigest() if options.verbose > 0 and not file_too_large: print "Uploading %s file for %s" % (type, filename) url = "/%d/upload_content/%d/%d" % (int(issue), int(patchset), file_id) form_fields = [("filename", filename), ("status", status), ("checksum", checksum), ("is_binary", str(is_binary)), ("is_current", str(not is_base)), ] if file_too_large: form_fields.append(("file_too_large", "1")) if options.email: form_fields.append(("user", options.email)) ctype, body = EncodeMultipartFormData(form_fields, [("data", filename, content)]) response_body = rpc_server.Send(url, body, content_type=ctype) if not response_body.startswith("OK"): StatusUpdate(" --> %s" % response_body) sys.exit(1) patches = dict() [patches.setdefault(v, k) for k, v in patch_list] for filename in patches.keys(): base_content, new_content, is_binary, status = files[filename] file_id_str = patches.get(filename) if file_id_str.find("nobase") != -1: base_content = None file_id_str = file_id_str[file_id_str.rfind("_") + 1:] file_id = int(file_id_str) if base_content != None: UploadFile(filename, file_id, base_content, is_binary, status, True) if new_content != None: UploadFile(filename, file_id, new_content, is_binary, status, False) def IsImage(self, filename): """Returns true if the filename has an image extension.""" mimetype = mimetypes.guess_type(filename)[0] if not mimetype: return False return mimetype.startswith("image/") def IsBinaryData(self, data): """Returns true if data contains a null byte.""" # Derived from how Mercurial's heuristic, see # http://selenic.com/hg/file/848a6658069e/mercurial/util.py#l229 return bool(data and "\0" in data) class SubversionVCS(VersionControlSystem): """Implementation of the VersionControlSystem interface for Subversion.""" def __init__(self, options): super(SubversionVCS, self).__init__(options) if self.options.revision: match = re.match(r"(\d+)(:(\d+))?", self.options.revision) if not match: ErrorExit("Invalid Subversion revision %s." % self.options.revision) self.rev_start = match.group(1) self.rev_end = match.group(3) else: self.rev_start = self.rev_end = None # Cache output from "svn list -r REVNO dirname". # Keys: dirname, Values: 2-tuple (ouput for start rev and end rev). self.svnls_cache = {} # Base URL is required to fetch files deleted in an older revision. # Result is cached to not guess it over and over again in GetBaseFile(). required = self.options.download_base or self.options.revision is not None self.svn_base = self._GuessBase(required) def GetGUID(self): return self._GetInfo("Repository UUID") def GuessBase(self, required): """Wrapper for _GuessBase.""" return self.svn_base def _GuessBase(self, required): """Returns base URL for current diff. Args: required: If true, exits if the url can't be guessed, otherwise None is returned. """ url = self._GetInfo("URL") if url: scheme, netloc, path, params, query, fragment = urlparse.urlparse(url) guess = "" # TODO(anatoli) - repository specific hacks should be handled by server if netloc == "svn.python.org" and scheme == "svn+ssh": path = "projects" + path scheme = "http" guess = "Python " elif netloc.endswith(".googlecode.com"): scheme = "http" guess = "Google Code " path = path + "/" base = urlparse.urlunparse((scheme, netloc, path, params, query, fragment)) logging.info("Guessed %sbase = %s", guess, base) return base if required: ErrorExit("Can't find URL in output from svn info") return None def _GetInfo(self, key): """Parses 'svn info' for current dir. Returns value for key or None""" for line in RunShell(["svn", "info"]).splitlines(): if line.startswith(key + ": "): return line.split(":", 1)[1].strip() def _EscapeFilename(self, filename): """Escapes filename for SVN commands.""" if "@" in filename and not filename.endswith("@"): filename = "%s@" % filename return filename def GenerateDiff(self, args): cmd = ["svn", "diff"] if self.options.revision: cmd += ["-r", self.options.revision] cmd.extend(args) data = RunShell(cmd) count = 0 for line in data.splitlines(): if line.startswith("Index:") or line.startswith("Property changes on:"): count += 1 logging.info(line) if not count: ErrorExit("No valid patches found in output from svn diff") return data def _CollapseKeywords(self, content, keyword_str): """Collapses SVN keywords.""" # svn cat translates keywords but svn diff doesn't. As a result of this # behavior patching.PatchChunks() fails with a chunk mismatch error. # This part was originally written by the Review Board development team # who had the same problem (http://reviews.review-board.org/r/276/). # Mapping of keywords to known aliases svn_keywords = { # Standard keywords 'Date': ['Date', 'LastChangedDate'], 'Revision': ['Revision', 'LastChangedRevision', 'Rev'], 'Author': ['Author', 'LastChangedBy'], 'HeadURL': ['HeadURL', 'URL'], 'Id': ['Id'], # Aliases 'LastChangedDate': ['LastChangedDate', 'Date'], 'LastChangedRevision': ['LastChangedRevision', 'Rev', 'Revision'], 'LastChangedBy': ['LastChangedBy', 'Author'], 'URL': ['URL', 'HeadURL'], } def repl(m): if m.group(2): return "$%s::%s$" % (m.group(1), " " * len(m.group(3))) return "$%s$" % m.group(1) keywords = [keyword for name in keyword_str.split(" ") for keyword in svn_keywords.get(name, [])] return re.sub(r"\$(%s):(:?)([^\$]+)\$" % '|'.join(keywords), repl, content) def GetUnknownFiles(self): status = RunShell(["svn", "status", "--ignore-externals"], silent_ok=True) unknown_files = [] for line in status.split("\n"): if line and line[0] == "?": unknown_files.append(line) return unknown_files def ReadFile(self, filename): """Returns the contents of a file.""" file = open(filename, 'rb') result = "" try: result = file.read() finally: file.close() return result def GetStatus(self, filename): """Returns the status of a file.""" if not self.options.revision: status = RunShell(["svn", "status", "--ignore-externals", self._EscapeFilename(filename)]) if not status: ErrorExit("svn status returned no output for %s" % filename) status_lines = status.splitlines() # If file is in a cl, the output will begin with # "\n--- Changelist 'cl_name':\n". See # http://svn.collab.net/repos/svn/trunk/notes/changelist-design.txt if (len(status_lines) == 3 and not status_lines[0] and status_lines[1].startswith("--- Changelist")): status = status_lines[2] else: status = status_lines[0] # If we have a revision to diff against we need to run "svn list" # for the old and the new revision and compare the results to get # the correct status for a file. else: dirname, relfilename = os.path.split(filename) if dirname not in self.svnls_cache: cmd = ["svn", "list", "-r", self.rev_start, self._EscapeFilename(dirname) or "."] out, err, returncode = RunShellWithReturnCodeAndStderr(cmd) if returncode: # Directory might not yet exist at start revison # svn: Unable to find repository location for 'abc' in revision nnn if re.match('^svn: Unable to find repository location for .+ in revision \d+', err): old_files = () else: ErrorExit("Failed to get status for %s:\n%s" % (filename, err)) else: old_files = out.splitlines() args = ["svn", "list"] if self.rev_end: args += ["-r", self.rev_end] cmd = args + [self._EscapeFilename(dirname) or "."] out, returncode = RunShellWithReturnCode(cmd) if returncode: ErrorExit("Failed to run command %s" % cmd) self.svnls_cache[dirname] = (old_files, out.splitlines()) old_files, new_files = self.svnls_cache[dirname] if relfilename in old_files and relfilename not in new_files: status = "D " elif relfilename in old_files and relfilename in new_files: status = "M " else: status = "A " return status def GetBaseFile(self, filename): status = self.GetStatus(filename) base_content = None new_content = None # If a file is copied its status will be "A +", which signifies # "addition-with-history". See "svn st" for more information. We need to # upload the original file or else diff parsing will fail if the file was # edited. if status[0] == "A" and status[3] != "+": # We'll need to upload the new content if we're adding a binary file # since diff's output won't contain it. mimetype = RunShell(["svn", "propget", "svn:mime-type", self._EscapeFilename(filename)], silent_ok=True) base_content = "" is_binary = bool(mimetype) and not mimetype.startswith("text/") if is_binary: new_content = self.ReadFile(filename) elif (status[0] in ("M", "D", "R") or (status[0] == "A" and status[3] == "+") or # Copied file. (status[0] == " " and status[1] == "M")): # Property change. args = [] if self.options.revision: # filename must not be escaped. We already add an ampersand here. url = "%s/%s@%s" % (self.svn_base, filename, self.rev_start) else: # Don't change filename, it's needed later. url = filename args += ["-r", "BASE"] cmd = ["svn"] + args + ["propget", "svn:mime-type", url] mimetype, returncode = RunShellWithReturnCode(cmd) if returncode: # File does not exist in the requested revision. # Reset mimetype, it contains an error message. mimetype = "" else: mimetype = mimetype.strip() get_base = False # this test for binary is exactly the test prescribed by the # official SVN docs at # http://subversion.apache.org/faq.html#binary-files is_binary = (bool(mimetype) and not mimetype.startswith("text/") and mimetype not in ("image/x-xbitmap", "image/x-xpixmap")) if status[0] == " ": # Empty base content just to force an upload. base_content = "" elif is_binary: get_base = True if status[0] == "M": if not self.rev_end: new_content = self.ReadFile(filename) else: url = "%s/%s@%s" % (self.svn_base, filename, self.rev_end) new_content = RunShell(["svn", "cat", url], universal_newlines=True, silent_ok=True) else: get_base = True if get_base: if is_binary: universal_newlines = False else: universal_newlines = True if self.rev_start: # "svn cat -r REV delete_file.txt" doesn't work. cat requires # the full URL with "@REV" appended instead of using "-r" option. url = "%s/%s@%s" % (self.svn_base, filename, self.rev_start) base_content = RunShell(["svn", "cat", url], universal_newlines=universal_newlines, silent_ok=True) else: base_content, ret_code = RunShellWithReturnCode( ["svn", "cat", self._EscapeFilename(filename)], universal_newlines=universal_newlines) if ret_code and status[0] == "R": # It's a replaced file without local history (see issue208). # The base file needs to be fetched from the server. url = "%s/%s" % (self.svn_base, filename) base_content = RunShell(["svn", "cat", url], universal_newlines=universal_newlines, silent_ok=True) elif ret_code: ErrorExit("Got error status from 'svn cat %s'" % filename) if not is_binary: args = [] if self.rev_start: url = "%s/%s@%s" % (self.svn_base, filename, self.rev_start) else: url = filename args += ["-r", "BASE"] cmd = ["svn"] + args + ["propget", "svn:keywords", url] keywords, returncode = RunShellWithReturnCode(cmd) if keywords and not returncode: base_content = self._CollapseKeywords(base_content, keywords) else: StatusUpdate("svn status returned unexpected output: %s" % status) sys.exit(1) return base_content, new_content, is_binary, status[0:5] class GitVCS(VersionControlSystem): """Implementation of the VersionControlSystem interface for Git.""" def __init__(self, options): super(GitVCS, self).__init__(options) # Map of filename -> (hash before, hash after) of base file. # Hashes for "no such file" are represented as None. self.hashes = {} # Map of new filename -> old filename for renames. self.renames = {} def GetGUID(self): revlist = RunShell("git rev-list --parents HEAD".split()).splitlines() # M-A: Return the 1st root hash, there could be multiple when a # subtree is merged. In that case, more analysis would need to # be done to figure out which HEAD is the 'most representative'. for r in revlist: if ' ' not in r: return r def PostProcessDiff(self, gitdiff): """Converts the diff output to include an svn-style "Index:" line as well as record the hashes of the files, so we can upload them along with our diff.""" # Special used by git to indicate "no such content". NULL_HASH = "0"*40 def IsFileNew(filename): return filename in self.hashes and self.hashes[filename][0] is None def AddSubversionPropertyChange(filename): """Add svn's property change information into the patch if given file is new file. We use Subversion's auto-props setting to retrieve its property. See http://svnbook.red-bean.com/en/1.1/ch07.html#svn-ch-7-sect-1.3.2 for Subversion's [auto-props] setting. """ if self.options.emulate_svn_auto_props and IsFileNew(filename): svnprops = GetSubversionPropertyChanges(filename) if svnprops: svndiff.append("\n" + svnprops + "\n") svndiff = [] filecount = 0 filename = None for line in gitdiff.splitlines(): match = re.match(r"diff --git a/(.*) b/(.*)$", line) if match: # Add auto property here for previously seen file. if filename is not None: AddSubversionPropertyChange(filename) filecount += 1 # Intentionally use the "after" filename so we can show renames. filename = match.group(2) svndiff.append("Index: %s\n" % filename) if match.group(1) != match.group(2): self.renames[match.group(2)] = match.group(1) else: # The "index" line in a git diff looks like this (long hashes elided): # index 82c0d44..b2cee3f 100755 # We want to save the left hash, as that identifies the base file. match = re.match(r"index (\w+)\.\.(\w+)", line) if match: before, after = (match.group(1), match.group(2)) if before == NULL_HASH: before = None if after == NULL_HASH: after = None self.hashes[filename] = (before, after) svndiff.append(line + "\n") if not filecount: ErrorExit("No valid patches found in output from git diff") # Add auto property for the last seen file. assert filename is not None AddSubversionPropertyChange(filename) return "".join(svndiff) def GenerateDiff(self, extra_args): extra_args = extra_args[:] if self.options.revision: if ":" in self.options.revision: extra_args = self.options.revision.split(":", 1) + extra_args else: extra_args = [self.options.revision] + extra_args # --no-ext-diff is broken in some versions of Git, so try to work around # this by overriding the environment (but there is still a problem if the # git config key "diff.external" is used). env = os.environ.copy() if "GIT_EXTERNAL_DIFF" in env: del env["GIT_EXTERNAL_DIFF"] # -M/-C will not print the diff for the deleted file when a file is renamed. # This is confusing because the original file will not be shown on the # review when a file is renamed. So, get a diff with ONLY deletes, then # append a diff (with rename detection), without deletes. cmd = [ "git", "diff", "--no-color", "--no-ext-diff", "--full-index", "--ignore-submodules", ] diff = RunShell( cmd + ["--no-renames", "--diff-filter=D"] + extra_args, env=env, silent_ok=True) if self.options.git_find_copies: similarity_options = ["--find-copies-harder", "-l100000", "-C%s" % self.options.git_similarity ] else: similarity_options = ["-M%s" % self.options.git_similarity ] diff += RunShell( cmd + ["--diff-filter=AMCRT"] + similarity_options + extra_args, env=env, silent_ok=True) # The CL could be only file deletion or not. So accept silent diff for both # commands then check for an empty diff manually. if not diff: ErrorExit("No output from %s" % (cmd + extra_args)) return diff def GetUnknownFiles(self): status = RunShell(["git", "ls-files", "--exclude-standard", "--others"], silent_ok=True) return status.splitlines() def GetFileContent(self, file_hash, is_binary): """Returns the content of a file identified by its git hash.""" data, retcode = RunShellWithReturnCode(["git", "show", file_hash], universal_newlines=not is_binary) if retcode: ErrorExit("Got error status from 'git show %s'" % file_hash) return data def GetBaseFile(self, filename): hash_before, hash_after = self.hashes.get(filename, (None,None)) base_content = None new_content = None status = None if filename in self.renames: status = "A +" # Match svn attribute name for renames. if filename not in self.hashes: # If a rename doesn't change the content, we never get a hash. base_content = RunShell( ["git", "show", "HEAD:" + filename], silent_ok=True) elif not hash_before: status = "A" base_content = "" elif not hash_after: status = "D" else: status = "M" is_binary = self.IsBinaryData(base_content) is_image = self.IsImage(filename) # Grab the before/after content if we need it. # Grab the base content if we don't have it already. if base_content is None and hash_before: base_content = self.GetFileContent(hash_before, is_binary) # Only include the "after" file if it's an image; otherwise it # it is reconstructed from the diff. if is_image and hash_after: new_content = self.GetFileContent(hash_after, is_binary) return (base_content, new_content, is_binary, status) class CVSVCS(VersionControlSystem): """Implementation of the VersionControlSystem interface for CVS.""" def __init__(self, options): super(CVSVCS, self).__init__(options) def GetGUID(self): """For now we don't know how to get repository ID for CVS""" return def GetOriginalContent_(self, filename): RunShell(["cvs", "up", filename], silent_ok=True) # TODO need detect file content encoding content = open(filename).read() return content.replace("\r\n", "\n") def GetBaseFile(self, filename): base_content = None new_content = None status = "A" output, retcode = RunShellWithReturnCode(["cvs", "status", filename]) if retcode: ErrorExit("Got error status from 'cvs status %s'" % filename) if output.find("Status: Locally Modified") != -1: status = "M" temp_filename = "%s.tmp123" % filename os.rename(filename, temp_filename) base_content = self.GetOriginalContent_(filename) os.rename(temp_filename, filename) elif output.find("Status: Locally Added"): status = "A" base_content = "" elif output.find("Status: Needs Checkout"): status = "D" base_content = self.GetOriginalContent_(filename) return (base_content, new_content, self.IsBinaryData(base_content), status) def GenerateDiff(self, extra_args): cmd = ["cvs", "diff", "-u", "-N"] if self.options.revision: cmd += ["-r", self.options.revision] cmd.extend(extra_args) data, retcode = RunShellWithReturnCode(cmd) count = 0 if retcode in [0, 1]: for line in data.splitlines(): if line.startswith("Index:"): count += 1 logging.info(line) if not count: ErrorExit("No valid patches found in output from cvs diff") return data def GetUnknownFiles(self): data, retcode = RunShellWithReturnCode(["cvs", "diff"]) if retcode not in [0, 1]: ErrorExit("Got error status from 'cvs diff':\n%s" % (data,)) unknown_files = [] for line in data.split("\n"): if line and line[0] == "?": unknown_files.append(line) return unknown_files class MercurialVCS(VersionControlSystem): """Implementation of the VersionControlSystem interface for Mercurial.""" def __init__(self, options, repo_dir): super(MercurialVCS, self).__init__(options) # Absolute path to repository (we can be in a subdir) self.repo_dir = os.path.normpath(repo_dir) # Compute the subdir cwd = os.path.normpath(os.getcwd()) assert cwd.startswith(self.repo_dir) self.subdir = cwd[len(self.repo_dir):].lstrip(r"\/") if self.options.revision: self.base_rev = self.options.revision else: self.base_rev = RunShell(["hg", "parent", "-q"]).split(':')[1].strip() def GetGUID(self): # See chapter "Uniquely identifying a repository" # http://hgbook.red-bean.com/read/customizing-the-output-of-mercurial.html info = RunShell("hg log -r0 --template {node}".split()) return info.strip() def _GetRelPath(self, filename): """Get relative path of a file according to the current directory, given its logical path in the repo.""" absname = os.path.join(self.repo_dir, filename) return os.path.relpath(absname) def GenerateDiff(self, extra_args): cmd = ["hg", "diff", "--git", "-r", self.base_rev] + extra_args data = RunShell(cmd, silent_ok=True) svndiff = [] filecount = 0 for line in data.splitlines(): m = re.match("diff --git a/(\S+) b/(\S+)", line) if m: # Modify line to make it look like as it comes from svn diff. # With this modification no changes on the server side are required # to make upload.py work with Mercurial repos. # NOTE: for proper handling of moved/copied files, we have to use # the second filename. filename = m.group(2) svndiff.append("Index: %s" % filename) svndiff.append("=" * 67) filecount += 1 logging.info(line) else: svndiff.append(line) if not filecount: ErrorExit("No valid patches found in output from hg diff") return "\n".join(svndiff) + "\n" def GetUnknownFiles(self): """Return a list of files unknown to the VCS.""" args = [] status = RunShell(["hg", "status", "--rev", self.base_rev, "-u", "."], silent_ok=True) unknown_files = [] for line in status.splitlines(): st, fn = line.split(" ", 1) if st == "?": unknown_files.append(fn) return unknown_files def GetBaseFile(self, filename): # "hg status" and "hg cat" both take a path relative to the current subdir, # but "hg diff" has given us the path relative to the repo root. base_content = "" new_content = None is_binary = False oldrelpath = relpath = self._GetRelPath(filename) # "hg status -C" returns two lines for moved/copied files, one otherwise out = RunShell(["hg", "status", "-C", "--rev", self.base_rev, relpath]) out = out.splitlines() # HACK: strip error message about missing file/directory if it isn't in # the working copy if out[0].startswith('%s: ' % relpath): out = out[1:] status, _ = out[0].split(' ', 1) if len(out) > 1 and status == "A": # Moved/copied => considered as modified, use old filename to # retrieve base contents oldrelpath = out[1].strip() status = "M" if ":" in self.base_rev: base_rev = self.base_rev.split(":", 1)[0] else: base_rev = self.base_rev if status != "A": base_content = RunShell(["hg", "cat", "-r", base_rev, oldrelpath], silent_ok=True) is_binary = self.IsBinaryData(base_content) if status != "R": new_content = open(relpath, "rb").read() is_binary = is_binary or self.IsBinaryData(new_content) if is_binary and base_content: # Fetch again without converting newlines base_content = RunShell(["hg", "cat", "-r", base_rev, oldrelpath], silent_ok=True, universal_newlines=False) if not is_binary: new_content = None return base_content, new_content, is_binary, status class PerforceVCS(VersionControlSystem): """Implementation of the VersionControlSystem interface for Perforce.""" def __init__(self, options): def ConfirmLogin(): # Make sure we have a valid perforce session while True: data, retcode = self.RunPerforceCommandWithReturnCode( ["login", "-s"], marshal_output=True) if not data: ErrorExit("Error checking perforce login") if not retcode and (not "code" in data or data["code"] != "error"): break print "Enter perforce password: " self.RunPerforceCommandWithReturnCode(["login"]) super(PerforceVCS, self).__init__(options) self.p4_changelist = options.p4_changelist if not self.p4_changelist: ErrorExit("A changelist id is required") if (options.revision): ErrorExit("--rev is not supported for perforce") self.p4_port = options.p4_port self.p4_client = options.p4_client self.p4_user = options.p4_user ConfirmLogin() if not options.title: description = self.RunPerforceCommand(["describe", self.p4_changelist], marshal_output=True) if description and "desc" in description: # Rietveld doesn't support multi-line descriptions raw_title = description["desc"].strip() lines = raw_title.splitlines() if len(lines): options.title = lines[0] def GetGUID(self): """For now we don't know how to get repository ID for Perforce""" return def RunPerforceCommandWithReturnCode(self, extra_args, marshal_output=False, universal_newlines=True): args = ["p4"] if marshal_output: # -G makes perforce format its output as marshalled python objects args.extend(["-G"]) if self.p4_port: args.extend(["-p", self.p4_port]) if self.p4_client: args.extend(["-c", self.p4_client]) if self.p4_user: args.extend(["-u", self.p4_user]) args.extend(extra_args) data, retcode = RunShellWithReturnCode( args, print_output=False, universal_newlines=universal_newlines) if marshal_output and data: data = marshal.loads(data) return data, retcode def RunPerforceCommand(self, extra_args, marshal_output=False, universal_newlines=True): # This might be a good place to cache call results, since things like # describe or fstat might get called repeatedly. data, retcode = self.RunPerforceCommandWithReturnCode( extra_args, marshal_output, universal_newlines) if retcode: ErrorExit("Got error status from %s:\n%s" % (extra_args, data)) return data def GetFileProperties(self, property_key_prefix = "", command = "describe"): description = self.RunPerforceCommand(["describe", self.p4_changelist], marshal_output=True) changed_files = {} file_index = 0 # Try depotFile0, depotFile1, ... until we don't find a match while True: file_key = "depotFile%d" % file_index if file_key in description: filename = description[file_key] change_type = description[property_key_prefix + str(file_index)] changed_files[filename] = change_type file_index += 1 else: break return changed_files def GetChangedFiles(self): return self.GetFileProperties("action") def GetUnknownFiles(self): # Perforce doesn't detect new files, they have to be explicitly added return [] def IsBaseBinary(self, filename): base_filename = self.GetBaseFilename(filename) return self.IsBinaryHelper(base_filename, "files") def IsPendingBinary(self, filename): return self.IsBinaryHelper(filename, "describe") def IsBinaryHelper(self, filename, command): file_types = self.GetFileProperties("type", command) if not filename in file_types: ErrorExit("Trying to check binary status of unknown file %s." % filename) # This treats symlinks, macintosh resource files, temporary objects, and # unicode as binary. See the Perforce docs for more details: # http://www.perforce.com/perforce/doc.current/manuals/cmdref/o.ftypes.html return not file_types[filename].endswith("text") def GetFileContent(self, filename, revision, is_binary): file_arg = filename if revision: file_arg += "#" + revision # -q suppresses the initial line that displays the filename and revision return self.RunPerforceCommand(["print", "-q", file_arg], universal_newlines=not is_binary) def GetBaseFilename(self, filename): actionsWithDifferentBases = [ "move/add", # p4 move "branch", # p4 integrate (to a new file), similar to hg "add" "add", # p4 integrate (to a new file), after modifying the new file ] # We only see a different base for "add" if this is a downgraded branch # after a file was branched (integrated), then edited. if self.GetAction(filename) in actionsWithDifferentBases: # -Or shows information about pending integrations/moves fstat_result = self.RunPerforceCommand(["fstat", "-Or", filename], marshal_output=True) baseFileKey = "resolveFromFile0" # I think it's safe to use only file0 if baseFileKey in fstat_result: return fstat_result[baseFileKey] return filename def GetBaseRevision(self, filename): base_filename = self.GetBaseFilename(filename) have_result = self.RunPerforceCommand(["have", base_filename], marshal_output=True) if "haveRev" in have_result: return have_result["haveRev"] def GetLocalFilename(self, filename): where = self.RunPerforceCommand(["where", filename], marshal_output=True) if "path" in where: return where["path"] def GenerateDiff(self, args): class DiffData: def __init__(self, perforceVCS, filename, action): self.perforceVCS = perforceVCS self.filename = filename self.action = action self.base_filename = perforceVCS.GetBaseFilename(filename) self.file_body = None self.base_rev = None self.prefix = None self.working_copy = True self.change_summary = None def GenerateDiffHeader(diffData): header = [] header.append("Index: %s" % diffData.filename) header.append("=" * 67) if diffData.base_filename != diffData.filename: if diffData.action.startswith("move"): verb = "rename" else: verb = "copy" header.append("%s from %s" % (verb, diffData.base_filename)) header.append("%s to %s" % (verb, diffData.filename)) suffix = "\t(revision %s)" % diffData.base_rev header.append("--- " + diffData.base_filename + suffix) if diffData.working_copy: suffix = "\t(working copy)" header.append("+++ " + diffData.filename + suffix) if diffData.change_summary: header.append(diffData.change_summary) return header def GenerateMergeDiff(diffData, args): # -du generates a unified diff, which is nearly svn format diffData.file_body = self.RunPerforceCommand( ["diff", "-du", diffData.filename] + args) diffData.base_rev = self.GetBaseRevision(diffData.filename) diffData.prefix = "" # We have to replace p4's file status output (the lines starting # with +++ or ---) to match svn's diff format lines = diffData.file_body.splitlines() first_good_line = 0 while (first_good_line < len(lines) and not lines[first_good_line].startswith("@@")): first_good_line += 1 diffData.file_body = "\n".join(lines[first_good_line:]) return diffData def GenerateAddDiff(diffData): fstat = self.RunPerforceCommand(["fstat", diffData.filename], marshal_output=True) if "headRev" in fstat: diffData.base_rev = fstat["headRev"] # Re-adding a deleted file else: diffData.base_rev = "0" # Brand new file diffData.working_copy = False rel_path = self.GetLocalFilename(diffData.filename) diffData.file_body = open(rel_path, 'r').read() # Replicate svn's list of changed lines line_count = len(diffData.file_body.splitlines()) diffData.change_summary = "@@ -0,0 +1" if line_count > 1: diffData.change_summary += ",%d" % line_count diffData.change_summary += " @@" diffData.prefix = "+" return diffData def GenerateDeleteDiff(diffData): diffData.base_rev = self.GetBaseRevision(diffData.filename) is_base_binary = self.IsBaseBinary(diffData.filename) # For deletes, base_filename == filename diffData.file_body = self.GetFileContent(diffData.base_filename, None, is_base_binary) # Replicate svn's list of changed lines line_count = len(diffData.file_body.splitlines()) diffData.change_summary = "@@ -1" if line_count > 1: diffData.change_summary += ",%d" % line_count diffData.change_summary += " +0,0 @@" diffData.prefix = "-" return diffData changed_files = self.GetChangedFiles() svndiff = [] filecount = 0 for (filename, action) in changed_files.items(): svn_status = self.PerforceActionToSvnStatus(action) if svn_status == "SKIP": continue diffData = DiffData(self, filename, action) # Is it possible to diff a branched file? Stackoverflow says no: # http://stackoverflow.com/questions/1771314/in-perforce-command-line-how-to-diff-a-file-reopened-for-add if svn_status == "M": diffData = GenerateMergeDiff(diffData, args) elif svn_status == "A": diffData = GenerateAddDiff(diffData) elif svn_status == "D": diffData = GenerateDeleteDiff(diffData) else: ErrorExit("Unknown file action %s (svn action %s)." % \ (action, svn_status)) svndiff += GenerateDiffHeader(diffData) for line in diffData.file_body.splitlines(): svndiff.append(diffData.prefix + line) filecount += 1 if not filecount: ErrorExit("No valid patches found in output from p4 diff") return "\n".join(svndiff) + "\n" def PerforceActionToSvnStatus(self, status): # Mirroring the list at http://permalink.gmane.org/gmane.comp.version-control.mercurial.devel/28717 # Is there something more official? return { "add" : "A", "branch" : "A", "delete" : "D", "edit" : "M", # Also includes changing file types. "integrate" : "M", "move/add" : "M", "move/delete": "SKIP", "purge" : "D", # How does a file's status become "purge"? }[status] def GetAction(self, filename): changed_files = self.GetChangedFiles() if not filename in changed_files: ErrorExit("Trying to get base version of unknown file %s." % filename) return changed_files[filename] def GetBaseFile(self, filename): base_filename = self.GetBaseFilename(filename) base_content = "" new_content = None status = self.PerforceActionToSvnStatus(self.GetAction(filename)) if status != "A": revision = self.GetBaseRevision(base_filename) if not revision: ErrorExit("Couldn't find base revision for file %s" % filename) is_base_binary = self.IsBaseBinary(base_filename) base_content = self.GetFileContent(base_filename, revision, is_base_binary) is_binary = self.IsPendingBinary(filename) if status != "D" and status != "SKIP": relpath = self.GetLocalFilename(filename) if is_binary: new_content = open(relpath, "rb").read() return base_content, new_content, is_binary, status # NOTE: The SplitPatch function is duplicated in engine.py, keep them in sync. def SplitPatch(data): """Splits a patch into separate pieces for each file. Args: data: A string containing the output of svn diff. Returns: A list of 2-tuple (filename, text) where text is the svn diff output pertaining to filename. """ patches = [] filename = None diff = [] for line in data.splitlines(True): new_filename = None if line.startswith('Index:'): unused, new_filename = line.split(':', 1) new_filename = new_filename.strip() elif line.startswith('Property changes on:'): unused, temp_filename = line.split(':', 1) # When a file is modified, paths use '/' between directories, however # when a property is modified '\' is used on Windows. Make them the same # otherwise the file shows up twice. temp_filename = temp_filename.strip().replace('\\', '/') if temp_filename != filename: # File has property changes but no modifications, create a new diff. new_filename = temp_filename if new_filename: if filename and diff: patches.append((filename, ''.join(diff))) filename = new_filename diff = [line] continue if diff is not None: diff.append(line) if filename and diff: patches.append((filename, ''.join(diff))) return patches def UploadSeparatePatches(issue, rpc_server, patchset, data, options): """Uploads a separate patch for each file in the diff output. Returns a list of [patch_key, filename] for each file. """ patches = SplitPatch(data) rv = [] for patch in patches: if len(patch[1]) > MAX_UPLOAD_SIZE: print ("Not uploading the patch for " + patch[0] + " because the file is too large.") continue form_fields = [("filename", patch[0])] if not options.download_base: form_fields.append(("content_upload", "1")) files = [("data", "data.diff", patch[1])] ctype, body = EncodeMultipartFormData(form_fields, files) url = "/%d/upload_patch/%d" % (int(issue), int(patchset)) print "Uploading patch for " + patch[0] response_body = rpc_server.Send(url, body, content_type=ctype) lines = response_body.splitlines() if not lines or lines[0] != "OK": StatusUpdate(" --> %s" % response_body) sys.exit(1) rv.append([lines[1], patch[0]]) return rv def GuessVCSName(options): """Helper to guess the version control system. This examines the current directory, guesses which VersionControlSystem we're using, and returns an string indicating which VCS is detected. Returns: A pair (vcs, output). vcs is a string indicating which VCS was detected and is one of VCS_GIT, VCS_MERCURIAL, VCS_SUBVERSION, VCS_PERFORCE, VCS_CVS, or VCS_UNKNOWN. Since local perforce repositories can't be easily detected, this method will only guess VCS_PERFORCE if any perforce options have been specified. output is a string containing any interesting output from the vcs detection routine, or None if there is nothing interesting. """ for attribute, value in options.__dict__.iteritems(): if attribute.startswith("p4") and value != None: return (VCS_PERFORCE, None) def RunDetectCommand(vcs_type, command): """Helper to detect VCS by executing command. Returns: A pair (vcs, output) or None. Throws exception on error. """ try: out, returncode = RunShellWithReturnCode(command) if returncode == 0: return (vcs_type, out.strip()) except OSError, (errcode, message): if errcode != errno.ENOENT: # command not found code raise # Mercurial has a command to get the base directory of a repository # Try running it, but don't die if we don't have hg installed. # NOTE: we try Mercurial first as it can sit on top of an SVN working copy. res = RunDetectCommand(VCS_MERCURIAL, ["hg", "root"]) if res != None: return res # Subversion from 1.7 has a single centralized .svn folder # ( see http://subversion.apache.org/docs/release-notes/1.7.html#wc-ng ) # That's why we use 'svn info' instead of checking for .svn dir res = RunDetectCommand(VCS_SUBVERSION, ["svn", "info"]) if res != None: return res # Git has a command to test if you're in a git tree. # Try running it, but don't die if we don't have git installed. res = RunDetectCommand(VCS_GIT, ["git", "rev-parse", "--is-inside-work-tree"]) if res != None: return res # detect CVS repos use `cvs status && $? == 0` rules res = RunDetectCommand(VCS_CVS, ["cvs", "status"]) if res != None: return res return (VCS_UNKNOWN, None) def GuessVCS(options): """Helper to guess the version control system. This verifies any user-specified VersionControlSystem (by command line or environment variable). If the user didn't specify one, this examines the current directory, guesses which VersionControlSystem we're using, and returns an instance of the appropriate class. Exit with an error if we can't figure it out. Returns: A VersionControlSystem instance. Exits if the VCS can't be guessed. """ vcs = options.vcs if not vcs: vcs = os.environ.get("CODEREVIEW_VCS") if vcs: v = VCS_ABBREVIATIONS.get(vcs.lower()) if v is None: ErrorExit("Unknown version control system %r specified." % vcs) (vcs, extra_output) = (v, None) else: (vcs, extra_output) = GuessVCSName(options) if vcs == VCS_MERCURIAL: if extra_output is None: extra_output = RunShell(["hg", "root"]).strip() return MercurialVCS(options, extra_output) elif vcs == VCS_SUBVERSION: return SubversionVCS(options) elif vcs == VCS_PERFORCE: return PerforceVCS(options) elif vcs == VCS_GIT: return GitVCS(options) elif vcs == VCS_CVS: return CVSVCS(options) ErrorExit(("Could not guess version control system. " "Are you in a working copy directory?")) def CheckReviewer(reviewer): """Validate a reviewer -- either a nickname or an email addres. Args: reviewer: A nickname or an email address. Calls ErrorExit() if it is an invalid email address. """ if "@" not in reviewer: return # Assume nickname parts = reviewer.split("@") if len(parts) > 2: ErrorExit("Invalid email address: %r" % reviewer) assert len(parts) == 2 if "." not in parts[1]: ErrorExit("Invalid email address: %r" % reviewer) def LoadSubversionAutoProperties(): """Returns the content of [auto-props] section of Subversion's config file as a dictionary. Returns: A dictionary whose key-value pair corresponds the [auto-props] section's key-value pair. In following cases, returns empty dictionary: - config file doesn't exist, or - 'enable-auto-props' is not set to 'true-like-value' in [miscellany]. """ if os.name == 'nt': subversion_config = os.environ.get("APPDATA") + "\\Subversion\\config" else: subversion_config = os.path.expanduser("~/.subversion/config") if not os.path.exists(subversion_config): return {} config = ConfigParser.ConfigParser() config.read(subversion_config) if (config.has_section("miscellany") and config.has_option("miscellany", "enable-auto-props") and config.getboolean("miscellany", "enable-auto-props") and config.has_section("auto-props")): props = {} for file_pattern in config.options("auto-props"): props[file_pattern] = ParseSubversionPropertyValues( config.get("auto-props", file_pattern)) return props else: return {} def ParseSubversionPropertyValues(props): """Parse the given property value which comes from [auto-props] section and returns a list whose element is a (svn_prop_key, svn_prop_value) pair. See the following doctest for example. >>> ParseSubversionPropertyValues('svn:eol-style=LF') [('svn:eol-style', 'LF')] >>> ParseSubversionPropertyValues('svn:mime-type=image/jpeg') [('svn:mime-type', 'image/jpeg')] >>> ParseSubversionPropertyValues('svn:eol-style=LF;svn:executable') [('svn:eol-style', 'LF'), ('svn:executable', '*')] """ key_value_pairs = [] for prop in props.split(";"): key_value = prop.split("=") assert len(key_value) <= 2 if len(key_value) == 1: # If value is not given, use '*' as a Subversion's convention. key_value_pairs.append((key_value[0], "*")) else: key_value_pairs.append((key_value[0], key_value[1])) return key_value_pairs def GetSubversionPropertyChanges(filename): """Return a Subversion's 'Property changes on ...' string, which is used in the patch file. Args: filename: filename whose property might be set by [auto-props] config. Returns: A string like 'Property changes on |filename| ...' if given |filename| matches any entries in [auto-props] section. None, otherwise. """ global svn_auto_props_map if svn_auto_props_map is None: svn_auto_props_map = LoadSubversionAutoProperties() all_props = [] for file_pattern, props in svn_auto_props_map.items(): if fnmatch.fnmatch(filename, file_pattern): all_props.extend(props) if all_props: return FormatSubversionPropertyChanges(filename, all_props) return None def FormatSubversionPropertyChanges(filename, props): """Returns Subversion's 'Property changes on ...' strings using given filename and properties. Args: filename: filename props: A list whose element is a (svn_prop_key, svn_prop_value) pair. Returns: A string which can be used in the patch file for Subversion. See the following doctest for example. >>> print FormatSubversionPropertyChanges('foo.cc', [('svn:eol-style', 'LF')]) Property changes on: foo.cc ___________________________________________________________________ Added: svn:eol-style + LF """ prop_changes_lines = [ "Property changes on: %s" % filename, "___________________________________________________________________"] for key, value in props: prop_changes_lines.append("Added: " + key) prop_changes_lines.append(" + " + value) return "\n".join(prop_changes_lines) + "\n" def RealMain(argv, data=None): """The real main function. Args: argv: Command line arguments. data: Diff contents. If None (default) the diff is generated by the VersionControlSystem implementation returned by GuessVCS(). Returns: A 2-tuple (issue id, patchset id). The patchset id is None if the base files are not uploaded by this script (applies only to SVN checkouts). """ options, args = parser.parse_args(argv[1:]) if options.help: if options.verbose < 2: # hide Perforce options parser.epilog = "Use '--help -v' to show additional Perforce options." parser.option_groups.remove(parser.get_option_group('--p4_port')) parser.print_help() sys.exit(0) global verbosity verbosity = options.verbose if verbosity >= 3: logging.getLogger().setLevel(logging.DEBUG) elif verbosity >= 2: logging.getLogger().setLevel(logging.INFO) vcs = GuessVCS(options) base = options.base_url if isinstance(vcs, SubversionVCS): # Guessing the base field is only supported for Subversion. # Note: Fetching base files may become deprecated in future releases. guessed_base = vcs.GuessBase(options.download_base) if base: if guessed_base and base != guessed_base: print "Using base URL \"%s\" from --base_url instead of \"%s\"" % \ (base, guessed_base) else: base = guessed_base if not base and options.download_base: options.download_base = True logging.info("Enabled upload of base file") if not options.assume_yes: vcs.CheckForUnknownFiles() if data is None: data = vcs.GenerateDiff(args) data = vcs.PostProcessDiff(data) if options.print_diffs: print "Rietveld diff start:*****" print data print "Rietveld diff end:*****" files = vcs.GetBaseFiles(data) if verbosity >= 1: print "Upload server:", options.server, "(change with -s/--server)" rpc_server = GetRpcServer(options.server, options.email, options.host, options.save_cookies, options.account_type) form_fields = [] repo_guid = vcs.GetGUID() if repo_guid: form_fields.append(("repo_guid", repo_guid)) if base: b = urlparse.urlparse(base) username, netloc = urllib.splituser(b.netloc) if username: logging.info("Removed username from base URL") base = urlparse.urlunparse((b.scheme, netloc, b.path, b.params, b.query, b.fragment)) form_fields.append(("base", base)) if options.issue: form_fields.append(("issue", str(options.issue))) if options.email: form_fields.append(("user", options.email)) if options.reviewers: for reviewer in options.reviewers.split(','): CheckReviewer(reviewer) form_fields.append(("reviewers", options.reviewers)) if options.cc: for cc in options.cc.split(','): CheckReviewer(cc) form_fields.append(("cc", options.cc)) # Process --message, --title and --file. message = options.message or "" title = options.title or "" if options.file: if options.message: ErrorExit("Can't specify both message and message file options") file = open(options.file, 'r') message = file.read() file.close() if options.issue: prompt = "Title describing this patch set: " else: prompt = "New issue subject: " title = ( title or message.split('\n', 1)[0].strip() or raw_input(prompt).strip()) if not title and not options.issue: ErrorExit("A non-empty title is required for a new issue") # For existing issues, it's fine to give a patchset an empty name. Rietveld # doesn't accept that so use a whitespace. title = title or " " if len(title) > 100: title = title[:99] + '…' if title and not options.issue: message = message or title form_fields.append(("subject", title)) # If it's a new issue send message as description. Otherwise a new # message is created below on upload_complete. if message and not options.issue: form_fields.append(("description", message)) # Send a hash of all the base file so the server can determine if a copy # already exists in an earlier patchset. base_hashes = "" for file, info in files.iteritems(): if not info[0] is None: checksum = md5(info[0]).hexdigest() if base_hashes: base_hashes += "|" base_hashes += checksum + ":" + file form_fields.append(("base_hashes", base_hashes)) if options.private: if options.issue: print "Warning: Private flag ignored when updating an existing issue." else: form_fields.append(("private", "1")) if options.send_patch: options.send_mail = True if not options.download_base: form_fields.append(("content_upload", "1")) if len(data) > MAX_UPLOAD_SIZE: print "Patch is large, so uploading file patches separately." uploaded_diff_file = [] form_fields.append(("separate_patches", "1")) else: uploaded_diff_file = [("data", "data.diff", data)] ctype, body = EncodeMultipartFormData(form_fields, uploaded_diff_file) response_body = rpc_server.Send("/upload", body, content_type=ctype) patchset = None if not options.download_base or not uploaded_diff_file: lines = response_body.splitlines() if len(lines) >= 2: msg = lines[0] patchset = lines[1].strip() patches = [x.split(" ", 1) for x in lines[2:]] else: msg = response_body else: msg = response_body StatusUpdate(msg) if not response_body.startswith("Issue created.") and \ not response_body.startswith("Issue updated."): sys.exit(0) issue = msg[msg.rfind("/")+1:] if not uploaded_diff_file: result = UploadSeparatePatches(issue, rpc_server, patchset, data, options) if not options.download_base: patches = result if not options.download_base: vcs.UploadBaseFiles(issue, rpc_server, patches, patchset, options, files) payload = {} # payload for final request if options.send_mail: payload["send_mail"] = "yes" if options.send_patch: payload["attach_patch"] = "yes" if options.issue and message: payload["message"] = message payload = urllib.urlencode(payload) rpc_server.Send("/" + issue + "/upload_complete/" + (patchset or ""), payload=payload) return issue, patchset def main(): try: logging.basicConfig(format=("%(asctime).19s %(levelname)s %(filename)s:" "%(lineno)s %(message)s ")) os.environ['LC_ALL'] = 'C' RealMain(sys.argv) except KeyboardInterrupt: print StatusUpdate("Interrupted.") sys.exit(1) if __name__ == "__main__": main()